FWaveInstance

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

Windows
MacOS
Linux

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

 

bEnableLowPassFilter

Whether or not to enable the low pass filter

Public variable

uint32: 1

 

bEQFilterApplied

Whether to apply audio effects

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

 

bOutputToBusOnly

Whether or not to only output this wave instances audio to buses only. Audio mixer only.

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

uint32: 1

 

bUseSpatialization

Whether to use spatialization

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

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

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

TArray< FSoundS...

 

SoundSourceBusSends

The sound source bus sends.

Public variable

USoundSubmix &#...

 

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

 

StereoBleed

The amount of stereo sounds to bleed to the rear speakers

Public variable

float

 

StereoSpread

Amount of spread for 3d multi-channel asset spatialization

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

(
    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

 

GetVolume()

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

Public function Const

float

 

GetVolumeApp()

Returns the volume due to application behavior for the wave instance.

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

 

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

 

SetStopping

(
    const bool bInIsStopping
)

Public function

void

 

SetVolume

(
    const float InVolume
)

Setters for various volume values on wave instances.

Public function

void

 

SetVolumeApp

(
    const float InVolumeApp
)

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.

Constants

Name

Description

TypeHashCounter

Static helper to create good unique type hashes

References

Module

Engine

Header

Runtime/Engine/Public/Audio.h

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback