UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
AudioComponent.h File Reference

Go to the source code of this file.

Classes

struct  UInitialActiveSoundParams
 

Typedefs

using FSharedISourceBufferListenerPtr = TSharedPtr< ISourceBufferListener, ESPMode::ThreadSafe >
 

Enumerations

enum class  EAudioComponentPlayState : uint8 {
  Playing , Stopped , Paused , FadingIn ,
  FadingOut , UMETA =(Hidden)
}
 
enum class  EAudioFaderCurve : uint8 {
  Linear , Logarithmic , UMETA =(DisplayName = "Sin (S-Curve)") , UMETA =(DisplayName = "Sin (Equal Power)") ,
  UMETA =(Hidden)
}
 

Functions

 DECLARE_DYNAMIC_MULTICAST_DELEGATE (FOnAudioFinished)
 
 DECLARE_MULTICAST_DELEGATE_OneParam (FOnAudioFinishedNative, UAudioComponent *)
 
 DECLARE_DYNAMIC_DELEGATE_TwoParams (FOnQueueSubtitles, const TArray< struct FSubtitleCue > &, Subtitles, float, CueDuration)
 
 DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam (FOnAudioPlayStateChanged, EAudioComponentPlayState, PlayState)
 
 DECLARE_MULTICAST_DELEGATE_TwoParams (FOnAudioPlayStateChangedNative, const UAudioComponent *, EAudioComponentPlayState)
 
 DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam (FOnAudioVirtualizationChanged, bool, bIsVirtualized)
 
 DECLARE_MULTICAST_DELEGATE_TwoParams (FOnAudioVirtualizationChangedNative, const UAudioComponent *, bool)
 
 DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams (FOnAudioPlaybackPercent, const USoundWave *, PlayingSoundWave, const float, PlaybackPercent)
 
 DECLARE_MULTICAST_DELEGATE_ThreeParams (FOnAudioPlaybackPercentNative, const UAudioComponent *, const USoundWave *, const float)
 
 DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams (FOnAudioSingleEnvelopeValue, const class USoundWave *, PlayingSoundWave, const float, EnvelopeValue)
 
 DECLARE_MULTICAST_DELEGATE_ThreeParams (FOnAudioSingleEnvelopeValueNative, const UAudioComponent *, const USoundWave *, const float)
 
 DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams (FOnAudioMultiEnvelopeValue, const float, AverageEnvelopeValue, const float, MaxEnvelope, const int32, NumWaveInstances)
 
 DECLARE_MULTICAST_DELEGATE_FourParams (FOnAudioMultiEnvelopeValueNative, const UAudioComponent *, const float, const float, const int32)
 

Typedef Documentation

◆ FSharedISourceBufferListenerPtr

Enumeration Type Documentation

◆ EAudioComponentPlayState

Enumerator
Playing 
Stopped 
Paused 
FadingIn 
FadingOut 
UMETA 

◆ EAudioFaderCurve

enum class EAudioFaderCurve : uint8
strong

Type of fade to use when adjusting the audio component's volume.

Enumerator
Linear 
Logarithmic 
UMETA 
UMETA 
UMETA 

Function Documentation

◆ DECLARE_DYNAMIC_DELEGATE_TwoParams()

DECLARE_DYNAMIC_DELEGATE_TwoParams ( FOnQueueSubtitles  ,
const TArray< struct FSubtitleCue > &  ,
Subtitles  ,
float  ,
CueDuration   
)

Called when subtitles are sent to the SubtitleManager. Set this delegate if you want to hijack the subtitles for other purposes

◆ DECLARE_DYNAMIC_MULTICAST_DELEGATE()

DECLARE_DYNAMIC_MULTICAST_DELEGATE ( FOnAudioFinished  )

called when we finish playing audio, either because it played to completion or because a Stop() call turned it off early

◆ DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam() [1/2]

DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam ( FOnAudioPlayStateChanged  ,
EAudioComponentPlayState  ,
PlayState   
)

Called when sound's PlayState changes.

◆ DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam() [2/2]

DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam ( FOnAudioVirtualizationChanged  ,
bool  ,
bIsVirtualized   
)

Called when sound becomes virtualized or realized (resumes playback from virtualization).

◆ DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams()

DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams ( FOnAudioMultiEnvelopeValue  ,
const float  ,
AverageEnvelopeValue  ,
const float  ,
MaxEnvelope  ,
const int32  ,
NumWaveInstances   
)

Called while a sound plays and returns the sound's average and max envelope value (using an envelope follower in the audio renderer per wave instance). This only works in the audio mixer.

◆ DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams() [1/2]

DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams ( FOnAudioPlaybackPercent  ,
const USoundWave ,
PlayingSoundWave  ,
const float  ,
PlaybackPercent   
)

Called as a sound plays on the audio component to allow BP to perform actions based on playback percentage. Computed as samples played divided by total samples, taking into account pitch. Not currently implemented on all platforms.

◆ DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams() [2/2]

DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams ( FOnAudioSingleEnvelopeValue  ,
const class USoundWave ,
PlayingSoundWave  ,
const float  ,
EnvelopeValue   
)

Called while a sound plays and returns the sound's envelope value (using an envelope follower in the audio renderer). This only works in the audio mixer.

◆ DECLARE_MULTICAST_DELEGATE_FourParams()

DECLARE_MULTICAST_DELEGATE_FourParams ( FOnAudioMultiEnvelopeValueNative  ,
const UAudioComponent ,
const float  ,
const float  ,
const int32   
)

shadow delegate declaration for above

◆ DECLARE_MULTICAST_DELEGATE_OneParam()

DECLARE_MULTICAST_DELEGATE_OneParam ( FOnAudioFinishedNative  ,
UAudioComponent  
)

shadow delegate declaration for above

◆ DECLARE_MULTICAST_DELEGATE_ThreeParams() [1/2]

DECLARE_MULTICAST_DELEGATE_ThreeParams ( FOnAudioPlaybackPercentNative  ,
const UAudioComponent ,
const USoundWave ,
const float   
)

shadow delegate declaration for above

◆ DECLARE_MULTICAST_DELEGATE_ThreeParams() [2/2]

DECLARE_MULTICAST_DELEGATE_ThreeParams ( FOnAudioSingleEnvelopeValueNative  ,
const UAudioComponent ,
const USoundWave ,
const float   
)

shadow delegate declaration for above

◆ DECLARE_MULTICAST_DELEGATE_TwoParams() [1/2]

DECLARE_MULTICAST_DELEGATE_TwoParams ( FOnAudioPlayStateChangedNative  ,
const UAudioComponent ,
EAudioComponentPlayState   
)

shadow delegate declaration for above

◆ DECLARE_MULTICAST_DELEGATE_TwoParams() [2/2]

DECLARE_MULTICAST_DELEGATE_TwoParams ( FOnAudioVirtualizationChangedNative  ,
const UAudioComponent ,
bool   
)

shadow delegate declaration for above