FWaveInstance

Structure encapsulating all information required to play a [USoundWave](API\Runtime\Engine\Sound\USoundWave) on a channel/source.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/Audio.h

Include

#include "Audio.h"

Syntax

struct FWaveInstance

Remarks

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.

Variables

Name Description

Public variable

float

 

AbsoluteAzimuth

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

Public variable

FActiveSound &#...

 

ActiveSound

Active Sound this wave instance belongs to

Public variable

float

 

AmbientZoneFilterFrequency

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

Public variable

float

 

AttenuationDistance

Distance over which the sound is attenuated.

Public variable

float

 

AttenuationHighpassFilterFrequency

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

Public variable

float

 

AttenuationLowpassFilterFrequency

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

Public variable

uint32: 1

 

bAlreadyNotifiedHook

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

Public variable

uint32: 1

 

bApplyRadioFilter

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

Public variable

uint32: 1

 

bCenterChannelOnly

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

Public variable

uint32: 1

 

bEnableBaseSubmix

Whether or not to render to the main submix

Public variable

uint32: 1

 

bEnableBusSends

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

Public variable

uint32: 1

 

bEnableLowPassFilter

Whether or not to enable the low pass filter

Public variable

uint32: 1

 

bEnableSubmixSends

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

Public variable

uint32: 1

 

bIsAmbisonics

Whether or not this wave instance is ambisonics.

Public variable

uint32: 1

 

bIsFinished

Whether wave instanced is finished

Public variable

uint32: 1

 

bIsMusic

Whether or not this wave is music

Public variable

uint32: 1

 

bIsOccluded

Whether or not the sound is occluded.

Public variable

uint32: 1

 

bIsPaused

Whether or not this sound is manually paused

Public variable

uint32: 1

 

bIsStarted

Whether wave instanced has been started

Public variable

uint32: 1

 

bIsStopping

Whether or not this wave instance is stopping.

Public variable

uint32: 1

 

bIsUISound

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

Public variable

uint32: 1

 

bReportedSpatializationWarning

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

Public variable

uint32: 1

 

bReverb

Whether or not this wave has reverb applied

Public variable

TArray< FSoundS...

 

BusSends

The source bus and/or audio bus sends.

Public variable

FRuntimeFloatCu...

 

CustomRevebSendCurve

Custom reverb send curve.

Public variable

int32

 

EnvelopeFollowerAttackTime

The envelope follower attack time in milliseconds.

Public variable

int32

 

EnvelopeFollowerReleaseTime

The envelope follower release time in milliseconds.

Public variable

float

 

LFEBleed

The amount of a sound to bleed to the LFE channel

Public variable

float

 

ListenerToSoundDistance

The distance from this wave instance to the closest listener.

Public variable

float

 

ListenerToSoundDistanceForPanning

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

Public variable

FVector

 

Location

Current location

Public variable

ELoopingMode

 

LoopingMode

Looping mode - None, loop with notification, forever

Public variable

float

 

LowPassFilterFrequency

The low pass filter frequency to use

Public variable

float

 

ManualReverbSendLevel

The manual send level to use if the sound is set to use manual send level.

Public variable

FNotifyBufferFi...

 

NotifyBufferFinishedHooks

Sound nodes to notify when the current audio buffer finishes

Public variable

float

 

OcclusionFilterFrequency

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

Public variable

UOcclusionPlugi...

 

OcclusionPluginSettings

The occlusion plugin settings to use for the wave instance.

Public variable

float

 

OmniRadius

At what distance we start transforming into omnidirectional soundsource

Public variable

EAudioOutputTar...

 

OutputTarget

Which output target the sound should play on.

Public variable

float

 

Pitch

Current pitch scale.

Public variable

float

 

PlaybackTime

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

Public variable

float

 

Priority

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

Public variable

TUniquePtr< Aud...

 

QuantizedRequestData

Quantized Request data

Public variable

float

 

RadioFilterVolume

Volume of the radio filter effect

Public variable

float

 

RadioFilterVolumeThreshold

The volume at which the radio filter kicks in

Public variable

UReverbPluginSo...

 

ReverbPluginSettings

The occlusion plugin settings to use for the wave instance.

Public variable

FVector2D

 

ReverbSendLevelDistanceRange

Reverb distance-based wet-level distance/radial range.

Public variable

FVector2D

 

ReverbSendLevelRange

Reverb distance-based wet-level amount range.

Public variable

EReverbSendMeth...

 

ReverbSendMethod

The reverb send method to use.

Public variable

USoundClass ...

 

SoundClass

Sound class

Public variable

float

 

SoundClassFilterFrequency

The low pass filter frequency to use from sound class.

Public variable

USoundSubmixBas...

 

SoundSubmix

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

Public variable

TArray< FSoundS...

 

SoundSubmixSends

Sound submix sends

Public variable

USoundEffectSou...

 

SourceEffectChain

Sound effect chain

Public variable

ESoundSpatializ...

 

SpatializationMethod

Which spatialization method to use to spatialize 3d sounds.

Public variable

USpatialization...

 

SpatializationPluginSettings

The occlusion plugin settings to use for the wave instance.

Public variable

float

 

StartTime

An offset/seek time to play this wave instance.

Public variable

float

 

StereoSpread

Amount of spread for 3d multi-channel asset spatialization

Public variable

TArray< FAttenu...

 

SubmixSendSettings

The submix send settings to use.

Public variable

uint32

 

TypeHash

Cached type hash

Public variable

uint8

 

UserIndex

User / Controller index that owns the sound

Public variable

float

 

VoiceCenterChannelVolume

Voice center channel volume

Public variable

USoundWave *...

 

WaveData

Wave data

Public variable

UPTRINT

 

WaveInstanceHash

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

Constructors

Name Description

Public function

FWaveInstance

(
    FWaveInstance&&
)

Public function

FWaveInstance

(
    const UPTRINT InWaveInstanceHash,
    FActiveSound& ActiveSound
)

Constructor, initializing all member variables.

Constructor, initializing all member variables.

Functions

Name Description

Public function

void

 

AddReferencedObjects

(
    FReferenceCollector& Collector
)

Function used by the GC.

Public function Const

float

 

GetActualVolume()

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

Public function Const

float

 

GetDistanceAttenuation()

Returns the distance attenuation of the source voice.

Public function Const

float

 

GetDynamicVolume()

Returns the dynamic volume of the sound

Public function Const

float

 

GetEnvelopeValue()

Gets the envelope value of the waveinstance.

Public function Const

FString

 

GetName()

Returns the name of the contained USoundWave

Public function Const

float

 

GetPitch()

Returns the pitch of the wave instance

Public function Const

bool

 

GetUseSpatialization()

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

Public function Const

float

 

GetVolume()

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

Public function Const

float

 

GetVolumeMultiplier()

Returns the volume multiplier on the wave instance.

Public function Const

float

 

GetVolumeWeightedPriority()

Returns the weighted priority of the wave instance.

Public function Const

float

 

GetVolumeWithDistanceAttenuation()

Returns the volume of the sound including distance attenuation.

Public function Const

bool

 

IsPlaying()

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

Public function Const

bool

 

IsSeekable()

Public function Const

bool

 

IsStopping()

Public function Const

bool

 

IsStreaming()

Checks whether wave is streaming and streaming is supported

Public function

void

 

NotifyFinished

(
    const bool bStopped
)

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

Public function

void

 

SetDistanceAttenuation

(
    const float InDistanceAttenuation
)

Public function

void

 

SetEnvelopeValue

(
    const float InEnvelopeValue
)

Sets the envelope value of the wave instance.

Public function

void

 

SetPitch

(
    const float InPitch
)

Public function

void

 

SetStopping

(
    const bool bInIsStopping
)

Public function

void

 

SetUseSpatialization

(
    const bool InUseSpatialization
)

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

Public function

void

 

SetVolume

(
    const float InVolume
)

Setters for various values on wave instances.

Public function

void

 

SetVolumeMultiplier

(
    const float InVolumeMultiplier
)

Public function Const

bool

 

ShouldStopDueToMaxConcurrency()

Returns the actual volume the wave instance will play at

Public function

void

 

StopWithoutNotification()

Stops the wave instance without notifying NotifyWaveInstanceFinishedHook.

Operators

Name Description

Public function

FWaveInstanc...

 

operator=

(
    FWaveInstance&&
)

Constants

Name

Description

TypeHashCounter

Static helper to create good unique type hashes

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss