FActiveSound

Windows
MacOS
Linux

Inheritance Hierarchy

ISoundModulatable

FActiveSound

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/ActiveSound.h

Include

#include "ActiveSound.h"

Syntax

struct FActiveSound : public ISoundModulatable

Variables

Name Description

Public variable

FSoundAttenuati...

 

AttenuationSettings

Public variable

FAudioDevice &#...

 

AudioDevice

Public variable

uint32

 

AudioVolumeID

Public variable

uint8: 1

 

bAllowSpatialization

Is this sound allowed to be spatialized?

Public variable

uint8: 1

 

bAlwaysPlay

Whether to artificially prioritize the component to play

Public variable

uint8: 1

 

bApplyInteriorVolumes

Whether some part of this sound will want interior sounds to be applied

Public variable

uint8: 1

 

bApplyRadioFilter

If true, this sound will not be stopped when flushing the audio device.

Public variable

FThreadSafeBool

 

bAsyncOcclusionPending

Whether or not there is an async occlusion trace pending

Public variable

uint8: 1

 

bCenterChannelOnly

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

Public variable

uint8: 1

 

bEnableLowPassFilter

Whether or not we have a low-pass filter enabled on this active sound.

Public variable

uint8: 1

 

bFinished

Whether the current component has finished playing

Public variable

uint8: 1

 

bGotInteriorSettings

Whether we have queried for the interior settings at least once

Public variable

uint8: 1

 

bHandleSubtitles

If true, the AudioComponent will be notified when a Wave is started to handle subtitles

Public variable

uint8: 1

 

bHasAttenuationSettings

Does this sound have attenuation settings specified.

Public variable

uint8: 1

 

bHasCheckedOcclusion

Whether or not the sound has checked if it was occluded already.

Public variable

uint8: 1

 

bHasExternalSubtitles

If true, subtitles are being provided for the sound externally, so it still needs to make sure the sound plays to trigger the subtitles.

Public variable

uint8: 1

 

bHasVirtualized

Whether or not sound has been virtualized and then realized

Public variable

uint8: 1

 

bIgnoreForFlushing

If true, this sound will not be stopped when flushing the audio device.

Public variable

uint8: 1

 

bIsMusic

Whether or not this audio component is a music clip

Public variable

FThreadSafeBool

 

bIsOccluded

Whether we were occluded the last time we checked

Public variable

uint8: 1

 

bIsPaused

Whether or not the active sound is paused. Independently set vs global pause or unpause.

Public variable

uint8: 1

 

bIsPlayingAudio

Whether or not this active sound is playing audio, as in making audible sounds.

Public variable

uint8: 1

 

bIsPreviewSound

Whether or not this active sound is a preview sound

Public variable

uint8: 1

 

bIsStopping

Whether or not the active sound is stopping.

Public variable

uint8: 1

 

bIsUISound

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

Public variable

uint8: 1

 

bLocationDefined

Whether the Location of the component is well defined

Public variable

uint8: 1

 

bRadioFilterSelected

If true, the decision on whether to apply the radio filter has been made.

Public variable

uint8: 1

 

bReverb

Whether or not the audio component should be excluded from reverb EQ processing

Public variable

uint8: 1

 

bShouldRemainActiveIfDropped

Whether the wave instances should remain active if they're dropped by the prioritization code.

Public variable

uint8: 1

 

bShouldStopDueToMaxConcurrency

Whether or not to stop this active sound due to max concurrency

Public variable

uint8: 1

 

bUpdateMultiEnvelopeValue

Whether or not this active sound will update the average envelope value of every wave instance that plays a sound source.

Public variable

uint8: 1

 

bUpdatePlaybackTime

Whether or not the active sound should update it's owning audio component's playback time.

Public variable

uint8: 1

 

bUpdatePlayPercentage

Whether or not this active sound will update play percentage.

Public variable

uint8: 1

 

bUpdateSingleEnvelopeValue

Whether or not this active sound will update the envelope value of every wave instance that plays a sound source.

Public variable

uint8: 1

 

bWarnedAboutOrphanedLooping

For debugging purposes, output to the log once that a looping sound has been orphaned

Public variable

Audio::FVolumeF...

 

ComponentVolumeFader

Fader that tracks component volume

Public variable

TMap< FConcurre...

 

ConcurrencyGroupData

The concurrent groups that this sound is actively playing in.

Public variable

TSet< USoundCon...

 

ConcurrencySet

Optional USoundConcurrency to override for the sound.

Public variable

float

 

CurrentInteriorLPF

Public variable

float

 

CurrentInteriorVolume

Public variable

FDynamicParamet...

 

CurrentOcclusionFilterFrequency

The interpolated parameter for the low-pass frequency due to occlusion.

Public variable

FDynamicParamet...

 

CurrentOcclusionVolumeAttenuation

The interpolated parameter for the volume attenuation due to occlusion.

Public variable

FColor

 

DebugColor

Public variable

int32

 

EnvelopeFollowerAttackTime

Envelope follower attack and release time parameters.

Public variable

int32

 

EnvelopeFollowerReleaseTime

Public variable

EFadeOut

 

FadeOut

Type of fade out currently being applied

Public variable

FAttenuationFoc...

 

FocusData

Cached data pertaining to focus system updated each frame

Public variable

TArray< FAudioC...

 

InstanceParameters

Public variable

FInteriorSettin...

 

InteriorSettings

Cache what volume settings we had last time so we don't have to search again if we didn't move

Public variable

FVector

 

LastLocation

Location last time playback was updated

Public variable

float

 

LastOcclusionCheckTime

Last time we checked for occlusion

Public variable

double

 

LastUpdateTime

To remember where the volumes are interpolating to and from.

Public variable

float

 

LowPassFilterFrequency

The low-pass filter frequency to apply if bEnableLowPassFilter is true.

Public variable

float

 

MaxDistance

The max distance this sound will be audible.

Public variable

float

 

MinCurrentPitch

Public variable

float

 

OcclusionCheckInterval

The time in seconds with which to check for occlusion from its closest listener

Public variable

float

 

PitchMultiplier

Public variable

float

 

PlaybackTime

Duration between now and when the sound has been started.

Public variable

float

 

PlaybackTimeNonVirtualized

If virtualized, duration between last time virtualized and now.

Public variable

float

 

Priority

The product of the component priority and the USoundBase priority

Public variable

float

 

RequestedStartTime

Public variable

TArray< uint8 >

 

SoundNodeData

Public variable

TMap< UPTRINT, ...

 

SoundNodeOffsetMap

Public variable

float

 

SourceInteriorLPF

Public variable

float

 

SourceInteriorVolume

Public variable

float

 

SubtitlePriority

Public variable

FTransform

 

Transform

Public variable

uint8

 

UserIndex

Public variable

float

 

VolumeConcurrency

The volume used to determine concurrency resolution for "quietest" active sound.

Public variable

float

 

VolumeMultiplier

Constructors

Name Description

Public function

FActiveSound()

Destructors

Name Description

Public function

~FActiveSound()

Functions

Name Description

Public function

void

 

AddReferencedObjects

(
    FReferenceCollector& Collector
)

Public function

FWaveInstanc...

 

AddWaveInstance

(
    const UPTRINT WaveInstanceHash
)

Add newly created wave instance to active sound

Public function

void

 

ApplyRadioFilter

(
    const FSoundParseParameters& Parse...
)

Check whether to apply the radio filter

Public function Const

bool

 

CanDelete()

Returns whether or not the active sound can be deleted.

Public function

void

 

ClearAudioComponent()

Public function Const

void

 

CollectAttenuationShapesForVisualization

Public function Static

FActiveSound...

 

CreateVirtualCopy

(
    const FActiveSound& ActiveSoundToC...,
    FAudioDevice& AudioDevice
)

Public function Const

int32

 

FindClosestListener

(
    const TArray< struct FListener >& ...
)

Determines which of the provided listeners is the closest to the sound

Public function Const

int32

 

FindClosestListener()

Determines which listener is the closest to the sound

Public function

FWaveInstanc...

 

FindWaveInstance

(
    const UPTRINT WaveInstanceHash
)

Find an existing waveinstance attached to this audio component (if any)

Public function Const

uint64

 

GetAudioComponentID()

Public function Const

FString

 

GetAudioComponentName()

Public function Const

FName

 

GetAudioComponentUserID()

Public function Const

bool

 

GetBoolParameter

(
    const FName InName,
    bool& OutBool
)

Try and find an Instance Parameter with the given name and if we find it return the boolean value.

Public function Const

int32

 

GetClosestListenerIndex()

Public function Const

bool

 

GetConcurrencyFadeDuration

(
    float& OutFadeDuration
)

Public function Const

void

 

GetConcurrencyHandles

(
    TArray< FConcurrencyHandle >& OutC...
)

Gets the sound concurrency handles applicable to this sound instance

Public function Const

bool

 

GetFloatParameter

(
    const FName InName,
    float& OutFloat
)

Try and find an Instance Parameter with the given name and if we find it return the float value.

Public function Const

float

 

GetHighestPriority()

Returns the highest effective priority of the child wave instances

Public function Const

bool

 

GetIntParameter

(
    const FName InName,
    int32& OutInt
)

Try and find an Instance Parameter with the given name and if we find it return the integer value.

Public function Const

FSoundOwnerO...

 

GetOwnerID()

Returns the unique ID of the active sound's owner if it exists.

Public function Const

FString

 

GetOwnerName()

Public function Const

float

 

GetPitch()

Public function Const

USoundBase &...

 

GetSound()

Public function Const

USoundClass ...

 

GetSoundClass()

Get the sound class to apply on this sound instance

Public function Const

void

 

GetSoundSourceBusSends

(
    EBusSendType BusSendType,
    TArray< FSoundSourceBusSendInfo >&...
)

Gets the sound source bus sends to use for this sound instance.

Public function Const

USoundSubmix...

 

GetSoundSubmix()

Get the sound submix to use for this sound instance

Public function Const

void

 

GetSoundSubmixSends

(
    TArray< FSoundSubmixSendInfo >& Ou...
)

Gets the sound submix sends to use for this sound instance.

Public function Const

USoundEffect...

 

GetSourceEffectChain()

Public function Const

float

 

GetTotalConcurrencyVolumeScale()

Gets total concurrency gain stage based on all concurrency memberships of sound

Public function Const

float

 

GetVolume()

Gets volume product all gain stages pertaining to active sound

Public function Const

const TMap< ...

 

GetWaveInstances()

Public function Const

bool

 

GetWaveParameter

(
    const FName InName,
    USoundWave*& OutWave
)

Try and find an Instance Parameter with the given name and if we find it return the USoundWave value.

Public function Const

TWeakObjectP...

 

GetWeakWorld()

Public function Const

UWorld *

 

GetWorld()

Public function Const

uint32

 

GetWorldID()

Public function Const

bool

 

IsLooping()

Whether or not the active sound is a looping sound.

Public function Const

bool

 

IsOneShot()

Whether or not the active sound a one-shot sound.

Public function Const

bool

 

IsPlayingAudio()

Whether or not the active sound is currently playing audible sound.

Public function Const

bool

 

IsPlayWhenSilent()

Whether or not sound reference is valid and set to play when silent.

Public function Static

void

 

OcclusionTraceDone

(
    const FTraceHandle& TraceHandle,
    FTraceDatum& TraceDatum
)

Delegate callback function when an async occlusion trace completes

Public function

void

 

ParseAttenuation

(
    FSoundParseParameters& OutParsePar...,
    int32 ListenerIndex,
    const FSoundAttenuationSettings& I...
)

Applies the active sound's attenuation settings to the input parse params using the given listener

Public function

void

 

RemoveWaveInstance

(
    const UPTRINT WaveInstanceHash
)

Public function

void

 

SetAudioComponent

(
    const FActiveSound& ActiveSound
)

Public function

void

 

SetAudioComponent

(
    const UAudioComponent& Component
)

Public function

void

 

SetAudioDevice

(
    FAudioDevice* InAudioDevice
)

Public function

void

 

SetBoolParameter

(
    const FName InName,
    const bool InBool
)

Sets a boolean instance parameter for the ActiveSound

Public function

void

 

SetFloatParameter

(
    const FName InName,
    const float InFloat
)

Sets a float instance parameter for the ActiveSound

Public function

void

 

SetIntParameter

(
    const FName InName,
    const int32 InInt
)

Sets an integer instance parameter for the ActiveSound

Public function

void

 

SetOwner

(
    AActor* Owner
)

Public function

void

 

SetPitch

(
    float Value
)

Public function

void

 

SetSound

(
    USoundBase* InSound
)

Public function

void

 

SetSoundClass

(
    USoundClass* SoundClass
)

Public function

void

 

SetSoundParameter

(
    const FAudioComponentParam& Param
)

Sets the audio component parameter on the active sound.

Public function

void

 

SetSourceBusSend

(
    EBusSendType BusSendTyoe,
    const FSoundSourceBusSendInfo& Sou...
)

Sets the amount of audio from this active sound to send to the source bus.

Public function

void

 

SetSourceEffectChain

Public function

void

 

SetSubmixSend

(
    const FSoundSubmixSendInfo& Submix...
)

Sets the amount of audio from this active sound to send to the submix.

Public function

void

 

SetVolume

(
    float Value
)

Public function

void

 

SetWaveParameter

(
    const FName InName,
    USoundWave* InWave
)

Sets a wave instance parameter for the ActiveSound

Public function

void

 

SetWorld

(
    UWorld* World
)

Public function

void

 

UpdateAttenuation

(
    float DeltaTime,
    FSoundParseParameters& ParseParams,
    int32 ListenerIndex,
    const FSoundAttenuationSettings...
)

Updates the active sound's attenuation settings to the input parse params using the given listener

Public function

void

 

UpdateFocusData

(
    float DeltaTime,
    const FAttenuationListenerData& Li...,
    FAttenuationFocusData* OutFocu...
)

Updates the provided focus data using the local

Public function

void

 

UpdateWaveInstances

(
    TArray< FWaveInstance* >& Out...,
    const float DeltaTime
)

Updates the wave instances to be played.

Overridden from ISoundModulatable

Name Description

Public function Virtual Const

USoundModula...

 

FindModulationSettings()

ISoundModulatable Implementation.

Public function Virtual Const

uint32

 

GetObjectId()

Gets the object definition id of the given playing sound's instance

Public function Virtual Const

int32

 

GetPlayCount()

Returns number of actively instances of sound playing (including virtualized instances)

Public function Virtual Const

bool

 

IsPreviewSound()

Returns whether or not sound is an editor preview sound

Public function Virtual

void

 

Stop()

Stops sound.

Enums

Name

Description

Public enum

EFadeOut

Constants

Deprecated Functions

Name Description

Public function

void

 

ParseAttenuation

(
    FSoundParseParameters& OutParsePar...,
    const FListener& InListener,
    const FSoundAttenuationSettings& I...
)

Use ParseAttenuation that passes a ListenerIndex instead

Public function

void

 

UpdateAttenuation

(
    float DeltaTime,
    FSoundParseParameters& ParseParams,
    const FListener& Listener,
    const FSoundAttenuationSettings...
)

Use UpdateAttenuation that passes a ListenerIndex instead

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