UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FWaveInstance Struct Reference

#include <Audio.h>

Public Member Functions

ENGINE_API FWaveInstance (const UPTRINT InWaveInstanceHash, FActiveSound &ActiveSound)
 
ENGINE_API FWaveInstance (FWaveInstance &&)
 
ENGINE_API FWaveInstanceoperator= (FWaveInstance &&)
 
ENGINE_API void StopWithoutNotification ()
 
ENGINE_API void NotifyFinished (const bool bStopped=false)
 
ENGINE_API void AddReferencedObjects (FReferenceCollector &Collector)
 
ENGINE_API bool ShouldStopDueToMaxConcurrency () const
 
void SetVolume (const float InVolume)
 
void SetDistanceAttenuation (const float InDistanceAttenuation)
 
void SetOcclusionAttenuation (const float InOcclusionAttenuation)
 
void SetPitch (const float InPitch)
 
void SetVolumeMultiplier (const float InVolumeMultiplier)
 
void SetStopping (const bool bInIsStopping)
 
bool IsStopping () const
 
ENGINE_API bool IsPlaying () const
 
float GetVolumeMultiplier () const
 
ENGINE_API float GetActualVolume () const
 
ENGINE_API float GetVolumeWithDistanceAndOcclusionAttenuation () const
 
ENGINE_API float GetDistanceAndOcclusionAttenuation () const
 
ENGINE_API float GetDistanceAttenuation () const
 
ENGINE_API float GetOcclusionAttenuation () const
 
ENGINE_API float GetDynamicVolume () const
 
ENGINE_API float GetPitch () const
 
ENGINE_API float GetVolume () const
 
ENGINE_API float GetVolumeWeightedPriority () const
 
ENGINE_API bool IsSeekable () const
 
ENGINE_API bool IsStreaming () const
 
ENGINE_API FString GetName () const
 
void SetEnvelopeValue (const float InEnvelopeValue)
 
float GetEnvelopeValue () const
 
void SetUseSpatialization (const bool InUseSpatialization)
 
ENGINE_API bool GetUseSpatialization () const
 
void SetSpatializationIsExternalSend (const bool InSpatializationIsExternalSend)
 
bool GetSpatializationIsExternalSend () const
 
uint32 GetPlayOrder () const
 
void SetRelativeRenderCost (float InRelativeRenderCost)
 
float GetRelativeRenderCost () const
 
ENGINE_API float GetEffectiveModulationValue (const EModulationDestination InDestination) const
 
ENGINE_API FSoundModulationDestinationSettings GetEffectiveModulationSettings (const EModulationDestination InDestination) const
 

Public Attributes

TObjectPtr< USoundWaveWaveData
 
TObjectPtr< USoundClassSoundClass
 
USoundSubmixBaseSoundSubmix
 
TArray< FSoundSubmixSendInfoSoundSubmixSends
 
TArray< FSoundSourceBusSendInfoBusSends [(int32) EBusSendType::Count]
 
USoundEffectSourcePresetChainSourceEffectChain
 
FNotifyBufferFinishedHooks NotifyBufferFinishedHooks
 
FActiveSoundActiveSound
 
TUniquePtr< Audio::FQuartzQuantizedRequestDataQuantizedRequestData
 
FSharedISourceBufferListenerPtr SourceBufferListener
 
bool bShouldSourceBufferListenerZeroBuffer = false
 
bool bShouldUseAudioLink = true
 
UAudioLinkSettingsAbstractAudioLinkSettingsOverride = nullptr
 
int32 EnvelopeFollowerAttackTime
 
int32 EnvelopeFollowerReleaseTime
 
float Priority
 
float VoiceCenterChannelVolume
 
float RadioFilterVolume
 
float RadioFilterVolumeThreshold
 
float LFEBleed
 
ELoopingMode LoopingMode
 
float StartTime
 
uint32 bEnableBusSends: 1
 
uint32 bEnableBaseSubmix: 1
 
uint32 bEnableSubmixSends: 1
 
uint32 bEnableSourceDataOverride: 1
 
uint32 bApplyRadioFilter:1
 
uint32 bIsStarted:1
 
uint32 bIsFinished:1
 
uint32 bAlreadyNotifiedHook:1
 
uint32 bSpatializationIsExternalSend: 1
 
uint32 bEnableLowPassFilter:1
 
uint32 bEnableHighPassFilter:1
 
uint32 bIsOccluded:1
 
uint32 bIsUISound:1
 
uint32 bIsMusic:1
 
uint32 bReverb:1
 
uint32 bCenterChannelOnly:1
 
uint32 bIsPaused:1
 
uint32 bReportedSpatializationWarning:1
 
uint32 bIsAmbisonics:1
 
uint32 bIsStopping:1
 
uint32 bIsDynamic:1
 
ESoundSpatializationAlgorithm SpatializationMethod
 
USpatializationPluginSourceSettingsBaseSpatializationPluginSettings
 
UOcclusionPluginSourceSettingsBaseOcclusionPluginSettings
 
UReverbPluginSourceSettingsBaseReverbPluginSettings
 
USourceDataOverridePluginSourceSettingsBaseSourceDataOverridePluginSettings
 
EAudioOutputTarget::Type OutputTarget
 
float LowPassFilterFrequency
 
float HighPassFilterFrequency
 
float SoundClassFilterFrequency
 
float OcclusionFilterFrequency
 
float AmbientZoneFilterFrequency
 
float AttenuationLowpassFilterFrequency
 
float AttenuationHighpassFilterFrequency
 
float Pitch
 
FVector Location
 
float NonSpatializedRadiusStart
 
float NonSpatializedRadiusEnd
 
ENonSpatializedRadiusSpeakerMapMode NonSpatializedRadiusMode
 
float StereoSpread
 
float AttenuationDistance
 
float ListenerToSoundDistance
 
float ListenerToSoundDistanceForPanning
 
float AbsoluteAzimuth
 
float PlaybackTime
 
float PlaybackPercent
 
float ReverbSendLevel
 
float ManualReverbSendLevel
 
TArray< FAttenuationSubmixSendSettingsAttenuationSubmixSends
 
UPTRINT WaveInstanceHash
 
uint8 UserIndex
 

Friends

FArchiveoperator<< (FArchive &Ar, FWaveInstance *WaveInstance)
 
uint32 GetTypeHash (FWaveInstance *A)
 

Detailed Description

Structure encapsulating all information required to play a USoundWave on a channel/source. This is required as a single USoundWave object can be used in multiple active cues or multiple times in the same cue.

Constructor & Destructor Documentation

◆ FWaveInstance() [1/2]

PRAGMA_ENABLE_DEPRECATION_WARNINGS FWaveInstance::FWaveInstance ( const UPTRINT  InWaveInstanceHash,
FActiveSound InActiveSound 
)

Constructor, initializing all member variables.

Constructor, initializing all member variables.

Parameters
InActiveSoundActiveSound this wave instance belongs to.

◆ FWaveInstance() [2/2]

PRAGMA_DISABLE_DEPRECATION_WARNINGS FWaveInstance::FWaveInstance ( FWaveInstance &&  )
default

Member Function Documentation

◆ AddReferencedObjects()

void FWaveInstance::AddReferencedObjects ( FReferenceCollector Collector)

Function used by the GC.

◆ GetActualVolume()

float FWaveInstance::GetActualVolume ( ) const

Returns the actual volume the wave instance will play at, including all gain stages.

◆ GetDistanceAndOcclusionAttenuation()

float FWaveInstance::GetDistanceAndOcclusionAttenuation ( ) const

Returns the combined distance and occlusion attenuation of the source voice.

◆ GetDistanceAttenuation()

float FWaveInstance::GetDistanceAttenuation ( ) const

Returns the distance attenuation of the source voice

◆ GetDynamicVolume()

float FWaveInstance::GetDynamicVolume ( ) const

Returns the dynamic volume of the sound

◆ GetEffectiveModulationSettings()

FSoundModulationDestinationSettings FWaveInstance::GetEffectiveModulationSettings ( const EModulationDestination  InDestination) const

◆ GetEffectiveModulationValue()

float FWaveInstance::GetEffectiveModulationValue ( const EModulationDestination  InDestination) const

◆ GetEnvelopeValue()

float FWaveInstance::GetEnvelopeValue ( ) const
inline

Gets the envelope value of the waveinstance. Only returns non-zero values if it's a real voice. Only implemented in the audio mixer.

◆ GetName()

FString FWaveInstance::GetName ( ) const

Returns the name of the contained USoundWave

◆ GetOcclusionAttenuation()

float FWaveInstance::GetOcclusionAttenuation ( ) const

Returns the occlusion attenuation of the source voice

◆ GetPitch()

float FWaveInstance::GetPitch ( ) const

Returns the pitch of the wave instance

◆ GetPlayOrder()

uint32 FWaveInstance::GetPlayOrder ( ) const
inline

◆ GetRelativeRenderCost()

float FWaveInstance::GetRelativeRenderCost ( ) const
inline

Retrieves the relative render cost of wave instance.

◆ GetSpatializationIsExternalSend()

bool FWaveInstance::GetSpatializationIsExternalSend ( ) const
inline

Whether spatialization is an external send

◆ GetUseSpatialization()

bool FWaveInstance::GetUseSpatialization ( ) const

Whether this wave will be spatialized, which controls 3D effects like panning

◆ GetVolume()

float FWaveInstance::GetVolume ( ) const

Returns the volume of the wave instance (ignoring application muting)

◆ GetVolumeMultiplier()

float FWaveInstance::GetVolumeMultiplier ( ) const
inline

Returns the volume multiplier on the wave instance.

◆ GetVolumeWeightedPriority()

float FWaveInstance::GetVolumeWeightedPriority ( ) const

Returns the weighted priority of the wave instance.

◆ GetVolumeWithDistanceAndOcclusionAttenuation()

float FWaveInstance::GetVolumeWithDistanceAndOcclusionAttenuation ( ) const

Returns the volume of the sound including distance attenuation.

◆ IsPlaying()

bool FWaveInstance::IsPlaying ( ) const

Returns whether or not the WaveInstance is actively playing sound or set to play when silent.

◆ IsSeekable()

bool FWaveInstance::IsSeekable ( ) const

◆ IsStopping()

bool FWaveInstance::IsStopping ( ) const
inline

◆ IsStreaming()

bool FWaveInstance::IsStreaming ( ) const

Checks whether wave is streaming and streaming is supported

◆ NotifyFinished()

void FWaveInstance::NotifyFinished ( const bool  bStopped = false)

Notifies the wave instance that the current playback buffer has finished.

Notifies the wave instance that it has finished.

◆ operator=()

FWaveInstance & FWaveInstance::operator= ( FWaveInstance &&  )
default

◆ SetDistanceAttenuation()

void FWaveInstance::SetDistanceAttenuation ( const float  InDistanceAttenuation)
inline

◆ SetEnvelopeValue()

void FWaveInstance::SetEnvelopeValue ( const float  InEnvelopeValue)
inline

Sets the envelope value of the wave instance. Only set if the wave instance is actually generating real audio with a source voice. Only implemented in the audio mixer.

◆ SetOcclusionAttenuation()

void FWaveInstance::SetOcclusionAttenuation ( const float  InOcclusionAttenuation)
inline

◆ SetPitch()

void FWaveInstance::SetPitch ( const float  InPitch)
inline

◆ SetRelativeRenderCost()

void FWaveInstance::SetRelativeRenderCost ( float  InRelativeRenderCost)
inline

Sets the relative render cost of the wave instance.

◆ SetSpatializationIsExternalSend()

void FWaveInstance::SetSpatializationIsExternalSend ( const bool  InSpatializationIsExternalSend)
inline

Whether spatialization is an external send

◆ SetStopping()

void FWaveInstance::SetStopping ( const bool  bInIsStopping)
inline

◆ SetUseSpatialization()

void FWaveInstance::SetUseSpatialization ( const bool  InUseSpatialization)
inline

Whether to use spatialization, which controls 3D effects like panning

◆ SetVolume()

void FWaveInstance::SetVolume ( const float  InVolume)
inline

Setters for various values on wave instances.

◆ SetVolumeMultiplier()

void FWaveInstance::SetVolumeMultiplier ( const float  InVolumeMultiplier)
inline

◆ ShouldStopDueToMaxConcurrency()

bool FWaveInstance::ShouldStopDueToMaxConcurrency ( ) const

Returns the actual volume the wave instance will play at

◆ StopWithoutNotification()

void FWaveInstance::StopWithoutNotification ( void  )

Stops the wave instance without notifying NotifyWaveInstanceFinishedHook.

Stops the wave instance without notifying NotifyWaveInstanceFinishedHook. This will NOT stop wave instance if it is set up to loop indefinitely or set to remain active.

Friends And Related Symbol Documentation

◆ GetTypeHash

uint32 GetTypeHash ( FWaveInstance A)
friend

◆ operator<<

FArchive & operator<< ( FArchive Ar,
FWaveInstance WaveInstance 
)
friend

Friend archive function used for serialization.

Member Data Documentation

◆ AbsoluteAzimuth

float FWaveInstance::AbsoluteAzimuth

The absolute position of the wave instance relative to forward vector of listener.

◆ ActiveSound

FActiveSound* FWaveInstance::ActiveSound

Active Sound this wave instance belongs to

◆ AmbientZoneFilterFrequency

float FWaveInstance::AmbientZoneFilterFrequency

The low pass filter frequency to use due to ambient zones.

◆ AttenuationDistance

float FWaveInstance::AttenuationDistance

Distance over which the sound is attenuated.

◆ AttenuationHighpassFilterFrequency

float FWaveInstance::AttenuationHighpassFilterFrequency

The high pass filter frequency to use due to distance attenuation. (using in audio mixer only)

◆ AttenuationLowpassFilterFrequency

float FWaveInstance::AttenuationLowpassFilterFrequency

The low pass filter frequency to use due to distance attenuation.

◆ AttenuationSubmixSends

TArray<FAttenuationSubmixSendSettings> FWaveInstance::AttenuationSubmixSends

The submix send settings to use.

◆ AudioLinkSettingsOverride

UAudioLinkSettingsAbstract* FWaveInstance::AudioLinkSettingsOverride = nullptr

◆ bAlreadyNotifiedHook

uint32 FWaveInstance::bAlreadyNotifiedHook

Whether the notify finished hook has been called since the last update/parsenodes

◆ bApplyRadioFilter

uint32 FWaveInstance::bApplyRadioFilter

Set to true if the sound nodes state that the radio filter should be applied

◆ bCenterChannelOnly

uint32 FWaveInstance::bCenterChannelOnly

Whether or not this sound class forces sounds to the center channel

◆ bEnableBaseSubmix

uint32 FWaveInstance::bEnableBaseSubmix

Whether or not to render to the main submix

◆ bEnableBusSends

uint32 FWaveInstance::bEnableBusSends

Whether or not to enable sending this audio's output to buses.

◆ bEnableHighPassFilter

uint32 FWaveInstance::bEnableHighPassFilter

Whether or not to enable the high pass filter

◆ bEnableLowPassFilter

uint32 FWaveInstance::bEnableLowPassFilter

Whether or not to enable the low pass filter

◆ bEnableSourceDataOverride

uint32 FWaveInstance::bEnableSourceDataOverride

Whether or not to use source data overrides

◆ bEnableSubmixSends

uint32 FWaveInstance::bEnableSubmixSends

Whether or not to enable Submix Sends in addition to the Main Submix

◆ bIsAmbisonics

uint32 FWaveInstance::bIsAmbisonics

Whether or not this wave instance is ambisonics.

◆ bIsDynamic

uint32 FWaveInstance::bIsDynamic

Is this or any of the submixes above it dynamic

◆ bIsFinished

uint32 FWaveInstance::bIsFinished

Whether wave instanced is finished

◆ bIsMusic

uint32 FWaveInstance::bIsMusic

Whether or not this wave is music

◆ bIsOccluded

uint32 FWaveInstance::bIsOccluded

Whether or not the sound is occluded.

◆ bIsPaused

uint32 FWaveInstance::bIsPaused

Whether or not this sound is manually paused

◆ bIsStarted

uint32 FWaveInstance::bIsStarted

Whether wave instanced has been started

◆ bIsStopping

uint32 FWaveInstance::bIsStopping

Whether or not this wave instance is stopping.

◆ bIsUISound

uint32 FWaveInstance::bIsUISound

Whether or not this sound plays when the game is paused in the UI

◆ bReportedSpatializationWarning

uint32 FWaveInstance::bReportedSpatializationWarning

Prevent spamming of spatialization of surround sounds by tracking if the warning has already been emitted

◆ bReverb

uint32 FWaveInstance::bReverb

Whether or not this wave has reverb applied

◆ bShouldSourceBufferListenerZeroBuffer

bool FWaveInstance::bShouldSourceBufferListenerZeroBuffer = false

◆ bShouldUseAudioLink

bool FWaveInstance::bShouldUseAudioLink = true

AudioLink Opt in

◆ bSpatializationIsExternalSend

uint32 FWaveInstance::bSpatializationIsExternalSend

Whether the spatialization method is an external send

◆ BusSends

The source bus and/or audio bus sends.

◆ EnvelopeFollowerAttackTime

int32 FWaveInstance::EnvelopeFollowerAttackTime

The envelope follower attack time in milliseconds.

◆ EnvelopeFollowerReleaseTime

int32 FWaveInstance::EnvelopeFollowerReleaseTime

The envelope follower release time in milliseconds.

◆ HighPassFilterFrequency

float FWaveInstance::HighPassFilterFrequency

The high pass filter frequency to use

◆ LFEBleed

float FWaveInstance::LFEBleed

The amount of a sound to bleed to the LFE channel

◆ ListenerToSoundDistance

float FWaveInstance::ListenerToSoundDistance

The distance from this wave instance to the closest listener.

◆ ListenerToSoundDistanceForPanning

float FWaveInstance::ListenerToSoundDistanceForPanning

The distance from this wave instance to the closest listener. (ignoring attenuation override)

◆ Location

FVector FWaveInstance::Location

Current location

◆ LoopingMode

ELoopingMode FWaveInstance::LoopingMode

Looping mode - None, loop with notification, forever

◆ LowPassFilterFrequency

float FWaveInstance::LowPassFilterFrequency

The low pass filter frequency to use

◆ ManualReverbSendLevel

float FWaveInstance::ManualReverbSendLevel

TODO remove

◆ NonSpatializedRadiusEnd

float FWaveInstance::NonSpatializedRadiusEnd

At what distance we are fully non-spatialized

◆ NonSpatializedRadiusMode

ENonSpatializedRadiusSpeakerMapMode FWaveInstance::NonSpatializedRadiusMode

How we are doing the non-spatialized radius feature.

◆ NonSpatializedRadiusStart

float FWaveInstance::NonSpatializedRadiusStart

At what distance we start transforming into non-spatialized soundsource

◆ NotifyBufferFinishedHooks

FNotifyBufferFinishedHooks FWaveInstance::NotifyBufferFinishedHooks

Sound nodes to notify when the current audio buffer finishes

◆ OcclusionFilterFrequency

float FWaveInstance::OcclusionFilterFrequency

The low pass filter frequency to use if the sound is occluded.

◆ OcclusionPluginSettings

UOcclusionPluginSourceSettingsBase* FWaveInstance::OcclusionPluginSettings

The occlusion plugin settings to use for the wave instance.

◆ OutputTarget

EAudioOutputTarget::Type FWaveInstance::OutputTarget

Which output target the sound should play on.

◆ Pitch

float FWaveInstance::Pitch

Current pitch scale.

◆ PlaybackPercent

float FWaveInstance::PlaybackPercent

The linear percentage of the Wave which has been played based on its duration. Updated from Mixer Source.

◆ PlaybackTime

float FWaveInstance::PlaybackTime

The playback time of the wave instance. Updated from active sound.

◆ Priority

float FWaveInstance::Priority

An audio component priority value that scales with volume (post all gain stages) and is used to determine voice playback priority.

◆ QuantizedRequestData

TUniquePtr<Audio::FQuartzQuantizedRequestData> FWaveInstance::QuantizedRequestData

Quantized Request data

◆ RadioFilterVolume

float FWaveInstance::RadioFilterVolume

Volume of the radio filter effect

◆ RadioFilterVolumeThreshold

float FWaveInstance::RadioFilterVolumeThreshold

The volume at which the radio filter kicks in

◆ ReverbPluginSettings

UReverbPluginSourceSettingsBase* FWaveInstance::ReverbPluginSettings

The occlusion plugin settings to use for the wave instance.

◆ ReverbSendLevel

float FWaveInstance::ReverbSendLevel

The output reverb send level to use for tje wave instance.

◆ SoundClass

TObjectPtr<USoundClass> FWaveInstance::SoundClass

Sound class

◆ SoundClassFilterFrequency

float FWaveInstance::SoundClassFilterFrequency

The low pass filter frequency to use from sound class.

◆ SoundSubmix

USoundSubmixBase* FWaveInstance::SoundSubmix

Sound submix object to send audio to for mixing in audio mixer.

◆ SoundSubmixSends

TArray<FSoundSubmixSendInfo> FWaveInstance::SoundSubmixSends

Sound submix sends

◆ SourceBufferListener

FSharedISourceBufferListenerPtr FWaveInstance::SourceBufferListener

Source Buffer listener

◆ SourceDataOverridePluginSettings

USourceDataOverridePluginSourceSettingsBase* FWaveInstance::SourceDataOverridePluginSettings

The source data override plugin settings to use for the wave instance.

◆ SourceEffectChain

USoundEffectSourcePresetChain* FWaveInstance::SourceEffectChain

Sound effect chain

◆ SpatializationMethod

ESoundSpatializationAlgorithm FWaveInstance::SpatializationMethod

Which spatialization method to use to spatialize 3d sounds.

◆ SpatializationPluginSettings

USpatializationPluginSourceSettingsBase* FWaveInstance::SpatializationPluginSettings

The occlusion plugin settings to use for the wave instance.

◆ StartTime

float FWaveInstance::StartTime

An offset/seek time to play this wave instance.

◆ StereoSpread

float FWaveInstance::StereoSpread

Amount of spread for 3d multi-channel asset spatialization

◆ UserIndex

uint8 FWaveInstance::UserIndex

User / Controller index that owns the sound

◆ VoiceCenterChannelVolume

float FWaveInstance::VoiceCenterChannelVolume

Voice center channel volume

◆ WaveData

TObjectPtr<USoundWave> FWaveInstance::WaveData

Wave data

◆ WaveInstanceHash

UPTRINT FWaveInstance::WaveInstanceHash

Hash value for finding the wave instance based on the path through the cue to get to it


The documentation for this struct was generated from the following files: