UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ISoundHandleOwner.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "Audio.h"
7
13{
14public:
15 virtual ~ISoundHandleOwner() = default;
16
18 {
19 if(Sound)
20 {
22 {
23 OutSoundHandleID = Interface->CreateSoundHandle(Sound, this);
25 }
26 }
27 else
28 {
29 UE_LOG(LogAudio, Warning, TEXT("Couldn't create Sound Handle because we didn't pass through a valid sound!"));
30 }
31
32 UE_LOG(LogAudio, Warning, TEXT("Couldn't create Sound Handle because we couldn't find any ISoundHandleSystems!"));
34 }
35
40 virtual void OnSoundHandleRemoved() {}
41};
#define TEXT(x)
Definition Platform.h:1272
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UE_LOG(CategoryName, Verbosity, Format,...)
Definition LogMacros.h:270
UEBinkAudioDecodeInterface * Interface
Definition binka_ue_decode_test.cpp:24
Definition ISoundHandleOwner.h:13
virtual void OnSoundHandleRemoved()
Definition ISoundHandleOwner.h:40
Audio::EResult CreateSoundHandle(USoundBase *Sound, Audio::FSoundHandleID &OutSoundHandleID)
Definition ISoundHandleOwner.h:17
virtual ~ISoundHandleOwner()=default
Definition ISoundHandleSystem.h:26
static TArray< ISoundHandleSystem * > GetRegisteredInterfaces()
Definition ISoundHandleSystem.h:72
Definition SoundBase.h:109
uint32 FSoundHandleID
Definition ISoundHandleSystem.h:12
EResult
Definition ISoundHandleSystem.h:15