UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FAudioDevice Class Referenceabstract

#include <AudioDevice.h>

+ Inheritance diagram for FAudioDevice:

Classes

struct  FAudioSpatializationInterfaceInfo
 
struct  FAudioVolumeSettings
 
struct  FCreateComponentParams
 

Public Member Functions

ENGINE_API UAudioComponentGetTestComponent (UWorld *InWorld)
 
ENGINE_API void StopTestComponent ()
 
ENGINE_API FAudioDevice ()
 
virtual ENGINE_API ~FAudioDevice ()
 
virtual void GetAudioDeviceList (TArray< FString > &OutAudioDeviceNames) const
 
ENGINE_API bool Init (Audio::FDeviceId InDeviceID, int32 InMaxSources, int32 BufferSizeOverride=INDEX_NONE, int32 NumBuffersOverride=INDEX_NONE)
 
ENGINE_API void OnDeviceCreated (Audio::FDeviceId InDeviceID)
 
ENGINE_API void OnDeviceDestroyed (Audio::FDeviceId InDeviceID)
 
ENGINE_API void Teardown ()
 
ENGINE_API void Deinitialize ()
 
ENGINE_API void Update (bool bGameTicking)
 
virtual void UpdateGameThread ()
 
ENGINE_API void Suspend (bool bGameTicking)
 
virtual ENGINE_API void CountBytes (FArchive &Ar)
 
ENGINE_API void AddReferencedObjects (FReferenceCollector &Collector)
 
ENGINE_API int32 GetSortedActiveWaveInstances (TArray< FWaveInstance * > &WaveInstances, const ESortedActiveWaveGetType::Type GetType)
 
ENGINE_API void UpdateActiveSoundPlaybackTime (bool bIsTimeTicking)
 
virtual void FadeOut ()
 
virtual void FadeIn ()
 
ENGINE_API void Flush (UWorld *WorldToFlush, bool bClearActivatedReverb=true)
 
virtual ENGINE_API void FlushExtended (UWorld *WorldToFlush, bool bClearActivatedReverb)
 
virtual void FlushAudioRenderingCommands (bool bPumpSynchronously=false)
 
ENGINE_API void OnPreGarbageCollect ()
 
ENGINE_API void StopSoundsUsingResource (USoundWave *SoundWave, TArray< UAudioComponent * > *StoppedComponents=nullptr)
 
virtual ENGINE_API void Precache (USoundWave *SoundWave, bool bSynchronous=false, bool bTrackMemory=true, bool bForceFullDecompression=false)
 
ENGINE_API float GetCompressionDurationThreshold (const FSoundGroup &SoundGroup)
 
ENGINE_API bool ShouldUseRealtimeDecompression (bool bForceFullDecompression, const FSoundGroup &SoundGroup, USoundWave *SoundWave, float CompressedDurationThreshold) const
 
ENGINE_API void PrecacheStartupSounds ()
 
ENGINE_API void SetMaxChannels (int32 InMaxChannels)
 
ENGINE_API void SetMaxChannelsScaled (float InScaledChannelCount)
 
ENGINE_API int32 GetMaxChannels () const
 
ENGINE_API int32 GetMaxSources () const
 
ENGINE_API TRange< floatGetGlobalPitchRange () const
 
ENGINE_API void StopSourcesUsingBuffer (FSoundBuffer *SoundBuffer)
 
virtual ENGINE_API void StopAllSounds (bool bShouldStopUISounds=false)
 
ENGINE_API void SetListener (UWorld *World, int32 InListenerIndex, const FTransform &ListenerTransform, float InDeltaSeconds)
 
ENGINE_API void SetListenerAttenuationOverride (int32 ListenerIndex, const FVector AttenuationPosition)
 
ENGINE_API void ClearListenerAttenuationOverride (int32 ListenerIndex)
 
const TArray< FListener > & GetListeners () const
 
UReverbEffectGetCurrentReverbEffect () const
 
ENGINE_API void PlaySoundAtLocation (USoundBase *Sound, UWorld *World, float VolumeMultiplier, float PitchMultiplier, float StartTime, const FVector &Location, const FRotator &Rotation, USoundAttenuation *AttenuationSettings=nullptr, USoundConcurrency *ConcurrencySettings=nullptr, const TArray< FAudioParameter > *Params=nullptr, const AActor *OwningActor=nullptr)
 
ENGINE_API void PlaySoundAtLocation (USoundBase *Sound, UWorld *World, float VolumeMultiplier, float PitchMultiplier, float StartTime, const FVector &Location, const FRotator &Rotation, USoundAttenuation *AttenuationSettings, USoundConcurrency *Concurrency, TArray< FAudioParameter > &&Params, const AActor *OwningActor=nullptr)
 
ENGINE_API void AddNewActiveSound (const FActiveSound &ActiveSound, const TArray< FAudioParameter > *InDefaultParams=nullptr, const FString *EventLogID=nullptr)
 
ENGINE_API void AddNewActiveSound (TSharedRef< FActiveSound > ActiveSound, TArray< FAudioParameter > &&InDefaultParams, const FString *EventLogID=nullptr)
 
ENGINE_API void AddNewActiveSound (const FActiveSound &ActiveSound, TArray< FAudioParameter > &&InDefaultParams)
 
ENGINE_API void RetriggerVirtualLoop (FAudioVirtualLoop &VirtualLoop)
 
ENGINE_API void StopActiveSound (uint64 AudioComponentID, const FString *EventLogID=nullptr)
 
ENGINE_API void StopActiveSound (FActiveSound *ActiveSound, const FString *EventLogID=nullptr)
 
ENGINE_API void PauseActiveSound (uint64 AudioComponentID, const bool bInIsPaused)
 
ENGINE_API void NotifyActiveSoundOcclusionTraceDone (FActiveSound *ActiveSound, bool bIsOccluded)
 
ENGINE_API FActiveSoundFindActiveSound (uint64 AudioComponentID)
 
ENGINE_API bool CanHaveMultipleActiveSounds (uint64 AudioComponentID) const
 
ENGINE_API void SetCanHaveMultipleActiveSounds (uint64 AudioComponentID, bool InCanHaveMultipleActiveSounds)
 
ENGINE_API void RemoveActiveSound (FActiveSound *ActiveSound)
 
ENGINE_API void AddAudioVolumeProxy (const FAudioVolumeProxy &Proxy)
 
ENGINE_API void RemoveAudioVolumeProxy (uint32 AudioVolumeID)
 
ENGINE_API void UpdateAudioVolumeProxy (const FAudioVolumeProxy &Proxy)
 
ENGINE_API void GetAudioVolumeSettings (const uint32 WorldID, const FVector &Location, FAudioVolumeSettings &OutSettings) const
 
ENGINE_API void ResetAudioVolumeProxyChangedState ()
 
ENGINE_API void GatherInteriorData (FActiveSound &ActiveSound, FSoundParseParameters &ParseParams) const
 
ENGINE_API void ApplyInteriorSettings (FActiveSound &ActiveSound, FSoundParseParameters &ParseParams) const
 
void NotifyPendingDelete (FActiveSound &ActiveSound) const
 
ENGINE_API bool GetDefaultAudioSettings (uint32 WorldID, FReverbSettings &OutReverbSettings, FInteriorSettings &OutInteriorSettings) const
 
ENGINE_API void SetDefaultAudioSettings (UWorld *World, const FReverbSettings &DefaultReverbSettings, const FInteriorSettings &DefaultInteriorSettings)
 
EDebugState GetMixDebugState () const
 
ENGINE_API void SetMixDebugState (EDebugState DebugState)
 
ENGINE_API void InitSoundClasses ()
 
ENGINE_API void RegisterSoundClass (USoundClass *InSoundClass)
 
ENGINE_API void UnregisterSoundClass (USoundClass *SoundClass)
 
virtual void InitSoundSubmixes ()
 
virtual void RegisterSoundSubmix (USoundSubmixBase *SoundSubmix, bool bInit)
 
virtual void UnregisterSoundSubmix (const USoundSubmixBase *SoundSubmix, const bool bReparentChildren)
 
virtual ENGINE_API USoundSubmixGetMainSubmixObject () const
 
virtual ENGINE_API void RegisterSubmixBufferListener (ISubmixBufferListener *InSubmixBufferListener, USoundSubmix *SoundSubmix=nullptr)
 
virtual ENGINE_API void UnregisterSubmixBufferListener (ISubmixBufferListener *InSubmixBufferListener, USoundSubmix *SoundSubmix=nullptr)
 
virtual ENGINE_API void RegisterSubmixBufferListener (TSharedRef< ISubmixBufferListener, ESPMode::ThreadSafe > InSubmixBufferListener, USoundSubmix &SoundSubmix)
 
virtual ENGINE_API void UnregisterSubmixBufferListener (TSharedRef< ISubmixBufferListener, ESPMode::ThreadSafe > InSubmixBufferListener, USoundSubmix &SoundSubmix)
 
virtual ENGINE_API Audio::FPatchOutputStrongPtr AddPatchForSubmix (uint32 InObjectId, float InPatchGain)
 
virtual ENGINE_API Audio::FPatchInput AddPatchInputForAudioBus (uint32 InAudioBusId, int32 InFrames, int32 InChannels, float InGain=1.f)
 
virtual ENGINE_API Audio::FPatchOutputStrongPtr AddPatchOutputForAudioBus (uint32 InAudioBusId, int32 InFrames, int32 InChannels, float InGain=1.f)
 
ENGINE_API FSoundClassPropertiesGetSoundClassCurrentProperties (USoundClass *InSoundClass)
 
ENGINE_API FSoundClassDynamicPropertiesGetSoundClassDynamicProperties (USoundClass *InSoundClass)
 
ENGINE_API bool LocationIsAudible (const FVector &Location, const float MaxDistance) const
 
ENGINE_API bool LocationIsAudible (const FVector &Location, int32 ListenerIndex, const float MaxDistance) const
 
ENGINE_API float GetDistanceToNearestListener (const FVector &Location) const
 
ENGINE_API bool GetDistanceSquaredToListener (const FVector &Location, int32 ListenerIndex, float &OutSqDistance) const
 
ENGINE_API bool GetDistanceSquaredToNearestListener (const FVector &Location, float &OutSqDistance) const
 
ENGINE_API bool GetListenerPosition (int32 ListenerIndex, FVector &OutPosition, bool bAllowOverride) const
 
ENGINE_API bool GetListenerTransform (int32 ListenerIndex, FTransform &OutTransform) const
 
ENGINE_API bool GetListenerWorldID (int32 ListenerIndex, uint32 &OutWorldID) const
 
ENGINE_API void SetDefaultBaseSoundMix (USoundMix *SoundMix)
 
ENGINE_API void RemoveSoundMix (USoundMix *SoundMix)
 
ENGINE_API void ResetInterpolation ()
 
ENGINE_API void EnableRadioEffect (bool bEnable=false)
 
ENGINE_API void SetBaseSoundMix (USoundMix *SoundMix)
 
ENGINE_API void PushSoundMixModifier (USoundMix *SoundMix, bool bIsPassive=false, bool bIsRetrigger=false)
 
ENGINE_API void SetSoundMixClassOverride (USoundMix *InSoundMix, USoundClass *InSoundClass, float Volume, float Pitch, float FadeInTime, bool bApplyToChildren)
 
ENGINE_API void ClearSoundMixClassOverride (USoundMix *InSoundMix, USoundClass *InSoundClass, float FadeOutTime)
 
ENGINE_API void PopSoundMixModifier (USoundMix *SoundMix, bool bIsPassive=false)
 
ENGINE_API void ClearSoundMixModifier (USoundMix *SoundMix)
 
ENGINE_API void ClearSoundMixModifiers ()
 
ENGINE_API void ActivateReverbEffect (UReverbEffect *ReverbEffect, FName TagName, float Priority, float Volume, float FadeTime)
 
ENGINE_API void DeactivateReverbEffect (FName TagName)
 
virtual bool HasCompressedAudioInfoClass (USoundWave *SoundWave)
 
virtual bool SupportsRealtimeDecompression () const
 
virtual bool DisablePCMAudioCaching () const
 
virtual bool ValidateAPICall (const TCHAR *Function, uint32 ErrorCode)
 
const TArray< FActiveSound * > & GetActiveSounds () const
 
ENGINE_API void InvalidateCachedInteriorVolumes () const
 
virtual void SuspendContext ()
 
virtual void ResumeContext ()
 
virtual bool IsExernalBackgroundSoundActive ()
 
ENGINE_API bool IsHRTFEnabledForAll () const
 
void SetHRTFEnabledForAll (bool InbHRTFEnabledForAll)
 
ENGINE_API bool IsHRTFDisabled () const
 
void SetHRTFDisabled (bool InIsHRTFDisabled)
 
void SetSpatializationInterfaceEnabled (bool InbSpatializationInterfaceEnabled)
 
ENGINE_API void RegisterPluginListener (const TAudioPluginListenerPtr PluginListener)
 
ENGINE_API void UnregisterPluginListener (const TAudioPluginListenerPtr PluginListener)
 
ENGINE_API bool IsAudioDeviceMuted () const
 
ENGINE_API void SetDeviceMuted (bool bMuted)
 
ENGINE_API void GetAzimuth (const FAttenuationListenerData &OutListenerData, float &OutAzimuth, float &AbsoluteAzimuth) const
 
ENGINE_API float GetFocusFactor (const float Azimuth, const FSoundAttenuationSettings &AttenuationSettings) const
 
ENGINE_API void GetMaxDistanceAndFocusFactor (USoundBase *Sound, const UWorld *World, const FVector &Location, const FSoundAttenuationSettings *AttenuationSettingsToApply, float &OutMaxDistance, float &OutFocusFactor)
 
ENGINE_API bool SoundIsAudible (USoundBase *Sound, const UWorld *World, const FVector &Location, const FSoundAttenuationSettings *AttenuationSettingsToApply, float MaxDistance, float FocusFactor) const
 
ENGINE_API int32 FindClosestListenerIndex (const FTransform &SoundTransform) const
 
ENGINE_API int32 FindClosestListenerIndex (const FVector &Position, float &OutSqDistance, bool AllowAttenuationOverrides) const
 
ENGINE_API void UnlinkActiveSoundFromComponent (const FActiveSound &InActiveSound)
 
virtual double GetAudioTime () const
 
virtual void EnableDebugAudioOutput ()
 
ENGINE_API float GetLowPassFilterResonance () const
 
virtual int32 GetNumActiveSources () const
 
int32 GetNumFreeSources () const
 
float GetSampleRate () const
 
int32 GetBufferLength () const
 
int32 GetNumBuffers () const
 
bool IsSpatializationPluginEnabled () const
 
ENGINE_API bool SetCurrentSpatializationPlugin (FName PluginName)
 
ENGINE_API TArray< FNameGetAvailableSpatializationPluginNames () const
 
TAudioSpatializationPtr GetSpatializationPluginInterface ()
 
ENGINE_API FAudioSpatializationInterfaceInfo GetCurrentSpatializationPluginInterfaceInfo ()
 
ENGINE_API bool SpatializationPluginInterfacesAvailable ()
 
bool IsModulationPluginEnabled () const
 
bool IsOcclusionPluginEnabled () const
 
bool IsReverbPluginEnabled () const
 
bool IsSourceDataOverridePluginEnabled () const
 
bool IsStoppingVoicesEnabled () const
 
bool IsBakedAnalaysisQueryingEnabled () const
 
ENGINE_API void SendCommandToActiveSounds (uint64 InAudioComponentID, TUniqueFunction< void(FActiveSound &)> InFunc, const TStatId InStatId=TStatId())
 
virtual bool IsNonRealtime () const
 
virtual void UpdateSourceEffectChain (const uint32 SourceEffectChainId, const TArray< FSourceEffectChainEntry > &SourceEffectChain, const bool bPlayEffectChainTails)
 
virtual bool GetCurrentSourceEffectChain (const uint32 SourceEffectChainId, TArray< FSourceEffectChainEntry > &OutCurrentSourceEffectChainEntries)
 
virtual void UpdateSubmixProperties (USoundSubmixBase *InSubmix)
 
virtual void StartRecording (USoundSubmix *InSubmix, float ExpectedRecordingDuration)
 
virtual Audio::FAlignedFloatBufferStopRecording (USoundSubmix *InSubmix, float &OutNumChannels, float &OutSampleRate)
 
virtual void StartEnvelopeFollowing (USoundSubmix *InSubmix)
 
virtual void StopEnvelopeFollowing (USoundSubmix *InSubmix)
 
virtual void SetSubmixWetDryLevel (USoundSubmix *InSoundSubmix, float InOutputVolume, float InWetLevel, float InDryLevel)
 
virtual void SetSubmixAutoDisable (USoundSubmix *InSoundSubmix, bool bInAutoDisable)
 
virtual void SetSubmixAutoDisableTime (USoundSubmix *InSoundSubmix, float InDisableTime)
 
virtual void UpdateSubmixModulationSettings (USoundSubmix *InSoundSubmix, USoundModulatorBase *InOutputModulation, USoundModulatorBase *InWetLevelModulation, USoundModulatorBase *InDryLevelModulation)
 
virtual void UpdateSubmixModulationSettings (USoundSubmix *InSoundSubmix, const TSet< TObjectPtr< USoundModulatorBase > > &InOutputModulation, const TSet< TObjectPtr< USoundModulatorBase > > &InWetLevelModulation, const TSet< TObjectPtr< USoundModulatorBase > > &InDryLevelModulation)
 
virtual void SetSubmixModulationBaseLevels (USoundSubmix *InSoundSubmix, float InVolumeModBase, float InWetModBase, float InDryModBase)
 
virtual void SetSubmixOutputVolume (USoundSubmix *InSoundSubmix, float InOutputVolume)
 
virtual void SetSubmixWetLevel (USoundSubmix *InSoundSubmix, float InWetLevel)
 
virtual void SetSubmixDryLevel (USoundSubmix *InSoundSubmix, float InDryLevel)
 
virtual void SetSubmixEffectChainOverride (USoundSubmix *InSoundSubmix, const TArray< FSoundEffectSubmixPtr > &InSubmixEffectChain, float InCrossfadeTime)
 
virtual void ClearSubmixEffectChainOverride (USoundSubmix *InSoundSubmix, float InCrossfadeTime)
 
virtual ENGINE_API void AddEnvelopeFollowerDelegate (USoundSubmix *InSubmix, const FOnSubmixEnvelopeBP &OnSubmixEnvelopeBP)
 
virtual ENGINE_API void RemoveEnvelopeFollowerDelegate (USoundSubmix *InSubmix, const FOnSubmixEnvelopeBP &OnSubmixEnvelopeBP)
 
virtual ENGINE_API void StartSpectrumAnalysis (USoundSubmix *InSubmix, const FSoundSpectrumAnalyzerSettings &InSettings)
 
virtual ENGINE_API void StopSpectrumAnalysis (USoundSubmix *InSubmix)
 
virtual ENGINE_API void GetMagnitudesForFrequencies (USoundSubmix *InSubmix, const TArray< float > &InFrequencies, TArray< float > &OutMagnitudes)
 
virtual ENGINE_API void GetPhasesForFrequencies (USoundSubmix *InSubmix, const TArray< float > &InFrequencies, TArray< float > &OutPhases)
 
virtual ENGINE_API void AddSpectralAnalysisDelegate (USoundSubmix *InSubmix, const FSoundSpectrumAnalyzerDelegateSettings &InDelegateSettings, const FOnSubmixSpectralAnalysisBP &OnSubmixSpectralAnalysisBP)
 
virtual ENGINE_API void RemoveSpectralAnalysisDelegate (USoundSubmix *InSubmix, const FOnSubmixSpectralAnalysisBP &OnSubmixSpectralAnalysisBP)
 
ENGINE_API voidInitEffect (FSoundSource *Source)
 
ENGINE_API voidUpdateEffect (FSoundSource *Source)
 
ENGINE_API void DestroyEffect (FSoundSource *Source)
 
FAudioEffectsManagerGetEffects ()
 
const FAudioEffectsManagerGetEffects () const
 
const TMap< USoundMix *, FSoundMixState > & GetSoundMixModifiers () const
 
const TArray< USoundMix * > & GetPrevPassiveSoundMixModifiers () const
 
USoundMixGetDefaultBaseSoundMixModifier ()
 
void SetSoundMixModifiers (const TMap< USoundMix *, FSoundMixState > &InSoundMixModifiers, const TArray< USoundMix * > &InPrevPassiveSoundMixModifiers, USoundMix *InDefaultBaseSoundMix)
 
ENGINE_API FDelegateHandle AddPreRenderDelegate (const FOnAudioDevicePreRender::FDelegate &InDelegate)
 
ENGINE_API bool RemovePreRenderDelegate (const FDelegateHandle &InHandle)
 
ENGINE_API FDelegateHandle AddPostRenderDelegate (const FOnAudioDevicePostRender::FDelegate &InDelegate)
 
ENGINE_API bool RemovePostRenderDelegate (const FDelegateHandle &InHandle)
 
virtual bool InitializeHardware ()
 
virtual void TeardownHardware ()
 
virtual void UpdateHardwareTiming ()
 
virtual void UpdateHardware ()
 
virtual ENGINE_API FAudioEffectsManagerCreateEffectsManager ()
 
virtual FSoundSourceCreateSoundSource ()=0
 
ENGINE_API void AddSoundToStop (FActiveSound *SoundToStop)
 
ENGINE_API bool IsPendingStop (FActiveSound *ActiveSound)
 
ENGINE_API FVector GetListenerTransformedDirection (const FVector &Position, float *OutDistance)
 
ENGINE_API float GetDeviceDeltaTime () const
 
ENGINE_API float GetGameDeltaTime () const
 
ENGINE_API bool IsUsingListenerAttenuationOverride (int32 ListenerIndex) const
 
ENGINE_API const FVectorGetListenerAttenuationOverride (int32 ListenerIndex) const
 
ENGINE_API void UpdateVirtualLoops (bool bForceUpdate)
 
virtual void UpdateDeviceDeltaTime ()
 
double GetAudioClock () const
 
virtual double GetInterpolatedAudioClock () const
 
ENGINE_API void AddVirtualLoop (const FAudioVirtualLoop &InVirtualLoop)
 
bool AreStartupSoundsPreCached () const
 
float GetTransientMasterVolume () const
 
ENGINE_API void SetTransientMasterVolume (float TransientPrimaryVolume)
 
float GetMasterVolume () const
 
float GetTransientPrimaryVolume () const
 
ENGINE_API void SetTransientPrimaryVolume (float TransientPrimaryVolume)
 
float GetPrimaryVolume () const
 
ENGINE_API FSoundSourceGetSoundSource (FWaveInstance *WaveInstance) const
 
ENGINE_API const FGlobalFocusSettingsGetGlobalFocusSettings () const
 
ENGINE_API void SetGlobalFocusSettings (const FGlobalFocusSettings &NewFocusSettings)
 
const FDynamicParameterGetGlobalPitchScale () const
 
ENGINE_API void SetGlobalPitchModulation (float PitchScale, float TimeSec)
 
ENGINE_API float ClampPitch (float InPitchScale) const
 
ENGINE_API void SetSoundClassDistanceScale (USoundClass *InSoundClass, float DistanceScale, float TimeSec)
 
float GetPlatformAudioHeadroom () const
 
ENGINE_API void SetPlatformAudioHeadroom (float PlatformHeadRoom)
 
ENGINE_API const TMap< FName, FActivatedReverb > & GetActiveReverb () const
 
bool PlayWhenSilentEnabled () const
 
ENGINE_API bool IsMainAudioDevice () const
 
void SetUseAttenuationForNonGameWorlds (bool bInUseAttenuationForNonGameWorlds)
 
ENGINE_API const TArray< FWaveInstance * > & GetActiveWaveInstances () const
 
float GetDefaultReverbSendLevel () const
 
ENGINE_API const TMap< FWaveInstance *, FSoundSource * > & GetWaveInstanceSourceMap () const
 
ENGINE_API FName GetAudioStateProperty (const FName &PropertyName) const
 
ENGINE_API void SetAudioStateProperty (const FName &PropertyName, const FName &PropertyValue)
 
UAudioEngineSubsystemGetSubsystemBase (TSubclassOf< UAudioEngineSubsystem > SubsystemClass) const
 
template<typename TSubsystemClass >
TSubsystemClassGetSubsystem () const
 
template<typename TSubsystemClass >
TArray< TSubsystemClass * > GetSubsystemArrayCopy () const
 
template<typename TSubsystemClass >
void ForEachSubsystem (TFunctionRef< void(TSubsystemClass *)> Operation) const
 
- Public Member Functions inherited from FExec
virtual CORE_API ~FExec ()
 
virtual CORE_API bool Exec (UWorld *InWorld, const TCHAR *Cmd, FOutputDevice &Ar)
 

Static Public Member Functions

static ENGINE_API const FAudioQualitySettingsGetQualityLevelSettings ()
 
static ENGINE_API bool LegacyReverbDisabled ()
 
static ENGINE_API UAudioComponentCreateComponent (USoundBase *Sound, const FCreateComponentParams &Params=FCreateComponentParams())
 
static ENGINE_API float GetMaxWorldDistance ()
 
static ENGINE_API int32 FindClosestListenerIndex (const FTransform &SoundTransform, const TArray< FListener > &InListeners)
 
static ENGINE_API FAudioDeviceHandle GetMainAudioDevice ()
 
static ENGINE_API FAudioDeviceManagerGetAudioDeviceManager ()
 
static ENGINE_API bool IsOcclusionPluginLoaded ()
 
static ENGINE_API bool IsReverbPluginLoaded ()
 
static ENGINE_API bool IsSourceDataOverridePluginLoaded ()
 
static ENGINE_API bool CanUseVRAudioDevice ()
 
template<typename TSubsystemClass >
static TSubsystemClassGetSubsystem (const FAudioDeviceHandle &InHandle)
 

Public Attributes

int32 NumStoppingSources
 
int32 SampleRate
 
FAudioPlatformSettings PlatformSettings
 
int32 NumPrecacheFrames
 
Audio::FDeviceId DeviceID
 
TAudioSpatializationPtr SpatializationPluginInterface = nullptr
 
TAudioSourceDataOverridePtr SourceDataOverridePluginInterface
 
TAudioReverbPtr ReverbPluginInterface
 
TAudioOcclusionPtr OcclusionInterface
 
TAudioModulationPtr ModulationInterface
 
TArray< TAudioPluginListenerPtrPluginListeners
 
TArray< FListenerProxyListenerProxies
 
uint8 bDisableAudioCaching:1 = false
 
uint8 bIsAudioDeviceHardwareInitialized: 1
 
uint8 bIsStoppingVoicesEnabled: 1
 
uint8 bIsBakedAnalysisEnabled: 1
 
uint8 bAudioMixerModuleLoaded: 1
 
uint8 bOcclusionIsExternalSend:1
 
uint8 bReverbIsExternalSend:1
 
uint8 bSpatializationIsExternalSend:1
 
int32 MaxChannelsSupportedBySpatializationPlugin
 

Protected Member Functions

ENGINE_API void NotifySubsystemsActiveSoundCreated (FActiveSound &ActiveSound) const
 
ENGINE_API void NotifySubsystemsActiveSoundDeleting (FActiveSound &ActiveSound) const
 
ENGINE_API void NotifySubsystemsVirtualizedSoundCreated (FActiveSound &ActiveSound) const
 
ENGINE_API void NotifySubsystemsVirtualizedSoundDeleting (FActiveSound &ActiveSound) const
 
void NotifyAddActiveSound (FActiveSound &ActiveSound) const
 
void NotifyPendingDeleteInternal (FActiveSound &ActiveSound) const
 
ENGINE_API void NotifySubsystemsSetOwner (FActiveSound &ActiveSound, const UObject *Owner) const
 
ENGINE_API void InitSoundSources ()
 
ENGINE_API void InitializeSubsystemCollection ()
 
ENGINE_API void HandlePause (bool bGameTicking, bool bGlobalPause=false)
 
ENGINE_API void StopSources (TArray< FWaveInstance * > &WaveInstances, int32 FirstActiveIndex)
 
ENGINE_API void StartSources (TArray< FWaveInstance * > &WaveInstances, int32 FirstActiveIndex, bool bGameTicking)
 
virtual void OnListenerUpdated (const TArray< FListener > &InListeners)
 
ENGINE_API void NotifyAudioDevicePreRender (const FAudioDeviceRenderInfo &InInfo)
 
ENGINE_API void NotifyAudioDevicePostRender (const FAudioDeviceRenderInfo &InInfo)
 
bool IsInitialized () const
 
- Protected Member Functions inherited from FExec
virtual bool Exec_Runtime (UWorld *InWorld, const TCHAR *Cmd, FOutputDevice &Ar)
 
virtual bool Exec_Dev (UWorld *InWorld, const TCHAR *Cmd, FOutputDevice &Ar)
 
virtual bool Exec_Editor (UWorld *InWorld, const TCHAR *Cmd, FOutputDevice &Ar)
 

Protected Attributes

FDelegateHandle DeviceCreatedHandle
 
FDelegateHandle DeviceDestroyedHandle
 
FCriticalSection RenderStateCallbackListCritSec
 
FOnAudioDevicePreRender OnAudioDevicePreRender
 
FOnAudioDevicePostRender OnAudioDevicePostRender
 
FName CurrentSpatializationPluginInterfaceName
 
TArray< FAudioSpatializationInterfaceInfoSpatializationInterfaces
 
FAudioSpatializationInterfaceInfoCurrentSpatializationInterfaceInfoPtr = nullptr
 
FAudioPluginInitializationParams PluginInitializationParams
 
TArray< FListenerListeners
 
TArray< FSoundSource * > Sources
 
TArray< FSoundSource * > FreeSources
 
FAudioEffectsManagerEffects
 
double AudioClock
 
uint8 bAllowCenterChannel3DPanning: 1
 
float DeviceDeltaTime
 

Friends

class FAudioEffectsManager
 
class FSoundSource
 
class FSoundConcurrencyManager
 

Constructor & Destructor Documentation

◆ FAudioDevice()

FAudioDevice::FAudioDevice ( )

Constructor

◆ ~FAudioDevice()

PRAGMA_DISABLE_DEPRECATION_WARNINGS FAudioDevice::~FAudioDevice ( )
virtualdefault

Member Function Documentation

◆ ActivateReverbEffect()

void FAudioDevice::ActivateReverbEffect ( UReverbEffect ReverbEffect,
FName  TagName,
float  Priority,
float  Volume,
float  FadeTime 
)

Activates a Reverb Effect without the need for a volume

Parameters
ReverbEffectReverb Effect to use
TagNameTag to associate with Reverb Effect
PriorityPriority of the Reverb Effect
VolumeVolume level of Reverb Effect
FadeTimeTime before Reverb Effect is fully active

◆ AddAudioVolumeProxy()

void FAudioDevice::AddAudioVolumeProxy ( const FAudioVolumeProxy Proxy)

◆ AddEnvelopeFollowerDelegate()

void FAudioDevice::AddEnvelopeFollowerDelegate ( USoundSubmix InSubmix,
const FOnSubmixEnvelopeBP OnSubmixEnvelopeBP 
)
virtual

Adds an envelope follower delegate to the submix for this audio device.

Reimplemented in Audio::FMixerDevice.

◆ AddNewActiveSound() [1/3]

void FAudioDevice::AddNewActiveSound ( const FActiveSound ActiveSound,
const TArray< FAudioParameter > *  InDefaultParams = nullptr,
const FString *  EventLogID = nullptr 
)

Adds an active sound to the audio device

◆ AddNewActiveSound() [2/3]

void FAudioDevice::AddNewActiveSound ( const FActiveSound ActiveSound,
TArray< FAudioParameter > &&  InDefaultParams 
)

Adds an active sound to the audio device

◆ AddNewActiveSound() [3/3]

void FAudioDevice::AddNewActiveSound ( TSharedRef< FActiveSound ActiveSound,
TArray< FAudioParameter > &&  InDefaultParams,
const FString *  EventLogID = nullptr 
)

Adds an active sound to the audio device

◆ AddPatchForSubmix()

Audio::FPatchOutputStrongPtr FAudioDevice::AddPatchForSubmix ( uint32  InObjectId,
float  InPatchGain 
)
virtual

Reimplemented in Audio::FMixerDevice.

◆ AddPatchInputForAudioBus()

Audio::FPatchInput FAudioDevice::AddPatchInputForAudioBus ( uint32  InAudioBusId,
int32  InFrames,
int32  InChannels,
float  InGain = 1.f 
)
virtual

◆ AddPatchOutputForAudioBus()

Audio::FPatchOutputStrongPtr FAudioDevice::AddPatchOutputForAudioBus ( uint32  InAudioBusId,
int32  InFrames,
int32  InChannels,
float  InGain = 1.f 
)
virtual

◆ AddPostRenderDelegate()

FDelegateHandle FAudioDevice::AddPostRenderDelegate ( const FOnAudioDevicePostRender::FDelegate &  InDelegate)

◆ AddPreRenderDelegate()

FDelegateHandle FAudioDevice::AddPreRenderDelegate ( const FOnAudioDevicePreRender::FDelegate &  InDelegate)

◆ AddReferencedObjects()

void FAudioDevice::AddReferencedObjects ( FReferenceCollector Collector)

Track references to UObjects

Threading Note: The FAudioThread may run concurrently with `AddReferencedObjects(...).

The FAudioThread is suspended during GC to avoid accesing objects during or after their destruction. But the FAudioThread does NOT suspend during AddReferencedObjects(...). Any object that needs to be accessed on the FAudioThread but needs protection from GC should be adding there references to the reference collector.

In FAudioDevice, there are two primary strategies used to achieve this, where systems generally choose one strategy depending on their system's needs, though sometimes require both strategies in more complex scenarios.

Strategy 1: Manage the lifetime of the object entirely on the GT, where GT logic can ensure that the object will be protected from GC any time the object is accessed on the FAudioThread.

Strategy 2: Manage the lifetime of the object on the AT and utilize the AudioThreadReferenceCritSec to protect against modifying the object while it is being read during AddReferencedObjects(...).

◆ AddSoundToStop()

void FAudioDevice::AddSoundToStop ( FActiveSound SoundToStop)

Marks a sound to be stopped. Returns true if added to stop, false if already pending stop.

◆ AddSpectralAnalysisDelegate()

void FAudioDevice::AddSpectralAnalysisDelegate ( USoundSubmix InSubmix,
const FSoundSpectrumAnalyzerDelegateSettings InDelegateSettings,
const FOnSubmixSpectralAnalysisBP OnSubmixSpectralAnalysisBP 
)
virtual

Reimplemented in Audio::FMixerDevice.

◆ AddVirtualLoop()

void FAudioDevice::AddVirtualLoop ( const FAudioVirtualLoop InVirtualLoop)

◆ ApplyInteriorSettings()

void FAudioDevice::ApplyInteriorSettings ( FActiveSound ActiveSound,
FSoundParseParameters ParseParams 
) const

Applies interior settings from affecting volumes to the active sound (called on audio thread)

◆ AreStartupSoundsPreCached()

bool FAudioDevice::AreStartupSoundsPreCached ( ) const
inline

◆ CanHaveMultipleActiveSounds()

bool FAudioDevice::CanHaveMultipleActiveSounds ( uint64  AudioComponentID) const

Whether a given Audio Component ID should be allowed to have multiple associated Active Sounds

◆ CanUseVRAudioDevice()

bool FAudioDevice::CanUseVRAudioDevice ( )
static

Query if the editor is in VR Preview for the current play world. Returns false for non-editor builds

◆ ClampPitch()

float FAudioDevice::ClampPitch ( float  InPitchScale) const

◆ ClearListenerAttenuationOverride()

void FAudioDevice::ClearListenerAttenuationOverride ( int32  ListenerIndex)

Removes a listener attenuation override for the specified listener.

◆ ClearSoundMixClassOverride()

void FAudioDevice::ClearSoundMixClassOverride ( USoundMix InSoundMix,
USoundClass InSoundClass,
float  FadeOutTime 
)

Clears a sound class override in the given sound mix.

◆ ClearSoundMixModifier()

void FAudioDevice::ClearSoundMixModifier ( USoundMix SoundMix)

Clear the effect of one SoundMix completely.

Parameters
SoundMixThe SoundMix to clear.

◆ ClearSoundMixModifiers()

void FAudioDevice::ClearSoundMixModifiers ( )

Clear the effect of all SoundMix modifiers.

◆ ClearSubmixEffectChainOverride()

virtual void FAudioDevice::ClearSubmixEffectChainOverride ( USoundSubmix InSoundSubmix,
float  InCrossfadeTime 
)
inlinevirtual

Clears all submix effect chain overrides from the submix.

Reimplemented in Audio::FMixerDevice.

◆ CountBytes()

void FAudioDevice::CountBytes ( FArchive Ar)
virtual

Counts the bytes for the structures used in this class

Reimplemented in Audio::FMixerDevice.

◆ CreateComponent()

UAudioComponent * FAudioDevice::CreateComponent ( USoundBase Sound,
const FCreateComponentParams Params = FCreateComponentParams() 
)
static

Creates an audio component to handle playing a sound.

Parameters
SoundThe USoundBase to play at the location.
ParamsThe parameter block of properties to create the component based on
Returns
The created audio component if the function successfully created one or a nullptr if not successful. Note: if audio is disabled or if there were no hardware audio devices available, this will return nullptr.

◆ CreateEffectsManager()

FAudioEffectsManager * FAudioDevice::CreateEffectsManager ( )
virtual

Creates a new platform specific sound source

Reimplemented in Audio::FMixerDevice, and FIOSAudioDevice.

◆ CreateSoundSource()

virtual FSoundSource * FAudioDevice::CreateSoundSource ( )
pure virtual

Creates a new platform specific sound source

Implemented in Audio::FMixerDevice, and FIOSAudioDevice.

◆ DeactivateReverbEffect()

void FAudioDevice::DeactivateReverbEffect ( FName  TagName)

Deactivates a Reverb Effect not applied by a volume

Parameters
TagNameTag associated with Reverb Effect to remove

◆ Deinitialize()

void FAudioDevice::Deinitialize ( )

De-initialization step that occurs after device destroyed broadcast, but before removal from the device manager

◆ DestroyEffect()

void FAudioDevice::DestroyEffect ( FSoundSource Source)

Platform dependent call to destroy any effect related data

◆ DisablePCMAudioCaching()

virtual bool FAudioDevice::DisablePCMAudioCaching ( ) const
inlinevirtual

Whether or not the platform disables caching of decompressed PCM data (i.e. to save memory on fixed memory platforms

◆ EnableDebugAudioOutput()

virtual void FAudioDevice::EnableDebugAudioOutput ( )
inlinevirtual

Enables the audio device to output debug audio to test audio device output.

Reimplemented in Audio::FMixerDevice.

◆ EnableRadioEffect()

void FAudioDevice::EnableRadioEffect ( bool  bEnable = false)

Enables or Disables the radio effect.

◆ FadeIn()

virtual void FAudioDevice::FadeIn ( )
inlinevirtual

Reimplemented in Audio::FMixerDevice.

◆ FadeOut()

virtual void FAudioDevice::FadeOut ( )
inlinevirtual

Optional fadeout and fade in of audio to avoid clicks when closing or opening/reusing audio device.

Reimplemented in Audio::FMixerDevice.

◆ FindActiveSound()

FActiveSound * FAudioDevice::FindActiveSound ( uint64  AudioComponentID)

Finds the active sound for the specified audio component ID. This call cannot be called from the GameThread & AudioComponents can now execute multiple ActiveSound instances at once. Use 'SendCommandToActiveSounds' instead.

◆ FindClosestListenerIndex() [1/3]

int32 FAudioDevice::FindClosestListenerIndex ( const FTransform SoundTransform) const

Returns the index of the listener closest to the given sound transform

◆ FindClosestListenerIndex() [2/3]

int32 FAudioDevice::FindClosestListenerIndex ( const FTransform SoundTransform,
const TArray< FListener > &  InListeners 
)
static

Returns the index of the listener closest to the given sound transform

◆ FindClosestListenerIndex() [3/3]

int32 FAudioDevice::FindClosestListenerIndex ( const FVector Position,
float OutSqDistance,
bool  AllowAttenuationOverrides 
) const

◆ Flush()

void FAudioDevice::Flush ( UWorld WorldToFlush,
bool  bClearActivatedReverb = true 
)

Stop all the audio components and sources attached to the world. nullptr world means all components.

◆ FlushAudioRenderingCommands()

virtual void FAudioDevice::FlushAudioRenderingCommands ( bool  bPumpSynchronously = false)
inlinevirtual

Allows audio rendering command queue to flush during audio device flush.

Parameters
bPumpSynchronouslymust be called in situations where the audio render thread is not being called.

Reimplemented in Audio::FMixerDevice.

◆ FlushExtended()

void FAudioDevice::FlushExtended ( UWorld WorldToFlush,
bool  bClearActivatedReverb 
)
virtual

Reimplemented in Audio::FMixerDevice.

◆ ForEachSubsystem()

void FAudioDevice::ForEachSubsystem ( TFunctionRef< void(TSubsystemClass *)>  Operation) const
inline

Performs the given operation on all subsystems of the given class. It's safe to create new subsystems during this operation, but not to remove subsystems.

◆ GatherInteriorData()

void FAudioDevice::GatherInteriorData ( FActiveSound ActiveSound,
FSoundParseParameters ParseParams 
) const

Gathers data about interior volumes affecting the active sound (called on audio thread)

◆ GetActiveReverb()

const TMap< FName, FActivatedReverb > & FAudioDevice::GetActiveReverb ( ) const

◆ GetActiveSounds()

const TArray< FActiveSound * > & FAudioDevice::GetActiveSounds ( ) const
inline

◆ GetActiveWaveInstances()

const TArray< FWaveInstance * > & FAudioDevice::GetActiveWaveInstances ( ) const

◆ GetAudioClock()

double FAudioDevice::GetAudioClock ( ) const
inline

Returns the audio clock of the audio device. Not supported on all platforms.

◆ GetAudioDeviceList()

virtual void FAudioDevice::GetAudioDeviceList ( TArray< FString > &  OutAudioDeviceNames) const
inlinevirtual

Returns an array of available audio devices names for the platform

Reimplemented in Audio::FMixerDevice.

◆ GetAudioDeviceManager()

FAudioDeviceManager * FAudioDevice::GetAudioDeviceManager ( )
static

Returns the audio device manager

◆ GetAudioStateProperty()

FName FAudioDevice::GetAudioStateProperty ( const FName PropertyName) const

◆ GetAudioTime()

virtual double FAudioDevice::GetAudioTime ( ) const
inlinevirtual

Return the audio stream time

Reimplemented in Audio::FMixerDevice.

◆ GetAudioVolumeSettings()

void FAudioDevice::GetAudioVolumeSettings ( const uint32  WorldID,
const FVector Location,
FAudioVolumeSettings OutSettings 
) const

◆ GetAvailableSpatializationPluginNames()

TArray< FName > FAudioDevice::GetAvailableSpatializationPluginNames ( ) const

Get the current list of available spatialization plugins

◆ GetAzimuth()

void FAudioDevice::GetAzimuth ( const FAttenuationListenerData OutListenerData,
float OutAzimuth,
float AbsoluteAzimuth 
) const

Returns the azimuth angle of the sound relative to the sound's nearest listener. Used for 3d audio calculations.

◆ GetBufferLength()

int32 FAudioDevice::GetBufferLength ( ) const
inline

Returns the buffer length of the audio device.

◆ GetCompressionDurationThreshold()

float FAudioDevice::GetCompressionDurationThreshold ( const FSoundGroup SoundGroup)

◆ GetCurrentReverbEffect()

UReverbEffect * FAudioDevice::GetCurrentReverbEffect ( ) const
inline

Returns the currently applied reverb effect if there is one.

◆ GetCurrentSourceEffectChain()

virtual bool FAudioDevice::GetCurrentSourceEffectChain ( const uint32  SourceEffectChainId,
TArray< FSourceEffectChainEntry > &  OutCurrentSourceEffectChainEntries 
)
inlinevirtual

Returns the current source effect chain entries set dynamically from BP or elsewhere.

Reimplemented in Audio::FMixerDevice.

◆ GetCurrentSpatializationPluginInterfaceInfo()

FAudioDevice::FAudioSpatializationInterfaceInfo FAudioDevice::GetCurrentSpatializationPluginInterfaceInfo ( )

◆ GetDefaultAudioSettings()

bool FAudioDevice::GetDefaultAudioSettings ( uint32  WorldID,
FReverbSettings OutReverbSettings,
FInteriorSettings OutInteriorSettings 
) const

Gets the default reverb and interior settings for the provided world. Returns true if settings with WorldID were located

◆ GetDefaultBaseSoundMixModifier()

USoundMix * FAudioDevice::GetDefaultBaseSoundMixModifier ( )
inline

◆ GetDefaultReverbSendLevel()

float FAudioDevice::GetDefaultReverbSendLevel ( ) const
inline

Returns the default reverb send level used for sources which have reverb applied but no attenuation settings.

◆ GetDeviceDeltaTime()

float FAudioDevice::GetDeviceDeltaTime ( ) const

Returns the current audio device update delta time.

◆ GetDistanceSquaredToListener()

bool FAudioDevice::GetDistanceSquaredToListener ( const FVector Location,
int32  ListenerIndex,
float OutSqDistance 
) const

Sets OutSqDistance to the distance from location to the appropriate listener representation, depending on calling thread. Returns true if listener position is valid, false if not (in which case, OutSqDistance is undefined).

◆ GetDistanceSquaredToNearestListener()

bool FAudioDevice::GetDistanceSquaredToNearestListener ( const FVector Location,
float OutSqDistance 
) const

Sets OutSqDistance to the distance from location the closest listener, depending on calling thread. Returns true if listener position is valid, false if not (in which case, OutSqDistance is undefined).

◆ GetDistanceToNearestListener()

float FAudioDevice::GetDistanceToNearestListener ( const FVector Location) const

Returns the distance to the nearest listener from the given location

◆ GetEffects() [1/2]

FAudioEffectsManager * FAudioDevice::GetEffects ( )
inline

Return the pointer to the sound effects handler

◆ GetEffects() [2/2]

const FAudioEffectsManager * FAudioDevice::GetEffects ( ) const
inline

Return the pointer to the sound effects handler

◆ GetFocusFactor()

float FAudioDevice::GetFocusFactor ( const float  Azimuth,
const FSoundAttenuationSettings AttenuationSettings 
) const

Returns the focus factor of a sound based on its position and listener data.

◆ GetGameDeltaTime()

float FAudioDevice::GetGameDeltaTime ( ) const

Returns the game's delta time

◆ GetGlobalFocusSettings()

const FGlobalFocusSettings & FAudioDevice::GetGlobalFocusSettings ( ) const

◆ GetGlobalPitchRange()

TRange< float > FAudioDevice::GetGlobalPitchRange ( ) const

Returns global pitch range

◆ GetGlobalPitchScale()

const FDynamicParameter & FAudioDevice::GetGlobalPitchScale ( ) const
inline

◆ GetInterpolatedAudioClock()

virtual double FAudioDevice::GetInterpolatedAudioClock ( ) const
inlinevirtual

Returns the audio clock interploated between audio device callbacks to provide a smoothed value. Default implementation does not interpolate.

Reimplemented in Audio::FMixerDevice.

◆ GetListenerAttenuationOverride()

const FVector & FAudioDevice::GetListenerAttenuationOverride ( int32  ListenerIndex) const

Returns the listener attenuation override for the specified listener

◆ GetListenerPosition()

bool FAudioDevice::GetListenerPosition ( int32  ListenerIndex,
FVector OutPosition,
bool  bAllowOverride 
) const

Returns a position from the appropriate listener representation, depending on calling thread.

Parameters
ListenerIndexindex of the listener or proxy
OutPositionfilled in position of the listener or proxy
bAllowOverrideif true we will use the attenuation override for position, if set
Returns
true if successful

◆ GetListeners()

const TArray< FListener > & FAudioDevice::GetListeners ( ) const
inline

◆ GetListenerTransform()

bool FAudioDevice::GetListenerTransform ( int32  ListenerIndex,
FTransform OutTransform 
) const

Returns the transform of the appropriate listener representation, depending on calling thread

◆ GetListenerTransformedDirection()

FVector FAudioDevice::GetListenerTransformedDirection ( const FVector Position,
float OutDistance 
)

Gets the direction of the given position vector transformed relative to listener.

Parameters
PositionInput position vector to transform relative to listener
OutDistanceOptional output of distance from position to listener
Returns
The input position relative to the listener.

◆ GetListenerWorldID()

bool FAudioDevice::GetListenerWorldID ( int32  ListenerIndex,
uint32 OutWorldID 
) const

Returns the WorldID of the appropriate listener representation, depending on calling thread

◆ GetLowPassFilterResonance()

float FAudioDevice::GetLowPassFilterResonance ( ) const

Low pass filter OneOverQ value

◆ GetMagnitudesForFrequencies()

void FAudioDevice::GetMagnitudesForFrequencies ( USoundSubmix InSubmix,
const TArray< float > &  InFrequencies,
TArray< float > &  OutMagnitudes 
)
virtual

Reimplemented in Audio::FMixerDevice.

◆ GetMainAudioDevice()

PRAGMA_ENABLE_DEPRECATION_WARNINGS FAudioDeviceHandle FAudioDevice::GetMainAudioDevice ( )
static

Returns the main audio device of the engine

◆ GetMainSubmixObject()

USoundSubmix & FAudioDevice::GetMainSubmixObject ( ) const
virtual

Reimplemented in Audio::FMixerDevice.

◆ GetMasterVolume()

float FAudioDevice::GetMasterVolume ( ) const
inline

◆ GetMaxChannels()

int32 FAudioDevice::GetMaxChannels ( ) const

Returns the max channels used by the audio device.

◆ GetMaxDistanceAndFocusFactor()

void FAudioDevice::GetMaxDistanceAndFocusFactor ( USoundBase Sound,
const UWorld World,
const FVector Location,
const FSoundAttenuationSettings AttenuationSettingsToApply,
float OutMaxDistance,
float OutFocusFactor 
)

Gets the max distance and focus factor of a sound.

◆ GetMaxSources()

int32 FAudioDevice::GetMaxSources ( ) const

Returns the maximum sources used by the audio device set on initialization, including the number of stopping voices reserved.

◆ GetMaxWorldDistance()

float FAudioDevice::GetMaxWorldDistance ( )
static

Returns the global maximum distance used in the audio engine.

◆ GetMixDebugState()

EDebugState FAudioDevice::GetMixDebugState ( ) const
inline

Gets the current audio debug state

◆ GetNumActiveSources()

virtual int32 FAudioDevice::GetNumActiveSources ( ) const
inlinevirtual

Returns the number of active sound sources

Reimplemented in Audio::FMixerDevice.

◆ GetNumBuffers()

int32 FAudioDevice::GetNumBuffers ( ) const
inline

Returns the number of buffers the audio device keeps queued.

◆ GetNumFreeSources()

int32 FAudioDevice::GetNumFreeSources ( ) const
inline

Returns the number of free sources.

◆ GetPhasesForFrequencies()

void FAudioDevice::GetPhasesForFrequencies ( USoundSubmix InSubmix,
const TArray< float > &  InFrequencies,
TArray< float > &  OutPhases 
)
virtual

Reimplemented in Audio::FMixerDevice.

◆ GetPlatformAudioHeadroom()

float FAudioDevice::GetPlatformAudioHeadroom ( ) const
inline

◆ GetPrevPassiveSoundMixModifiers()

const TArray< USoundMix * > & FAudioDevice::GetPrevPassiveSoundMixModifiers ( ) const
inline

◆ GetPrimaryVolume()

float FAudioDevice::GetPrimaryVolume ( ) const
inline

Returns the volume that combines transient master volume and the FApp::GetVolumeMultiplier() value

◆ GetQualityLevelSettings()

const FAudioQualitySettings & FAudioDevice::GetQualityLevelSettings ( )
static

Returns the quality settings used by the default audio settings.

◆ GetSampleRate()

float FAudioDevice::GetSampleRate ( ) const
inline

Returns the sample rate used by the audio device.

◆ GetSortedActiveWaveInstances()

int32 FAudioDevice::GetSortedActiveWaveInstances ( TArray< FWaveInstance * > &  WaveInstances,
const ESortedActiveWaveGetType::Type  GetType 
)

Iterate over the active AudioComponents for wave instances that could be playing.

Returns
Index of first wave instance that can have a source attached

◆ GetSoundClassCurrentProperties()

FSoundClassProperties * FAudioDevice::GetSoundClassCurrentProperties ( USoundClass InSoundClass)

Gets the current properties of a sound class, if the sound class hasn't been registered, then it returns nullptr

Parameters
SoundClassNamename of sound class to retrieve
Returns
sound class properties if it exists

◆ GetSoundClassDynamicProperties()

FSoundClassDynamicProperties * FAudioDevice::GetSoundClassDynamicProperties ( USoundClass InSoundClass)

Returns the parameters which are dynamic from the given sound class.

◆ GetSoundMixModifiers()

const TMap< USoundMix *, FSoundMixState > & FAudioDevice::GetSoundMixModifiers ( ) const
inline

◆ GetSoundSource()

FSoundSource * FAudioDevice::GetSoundSource ( FWaveInstance WaveInstance) const

◆ GetSpatializationPluginInterface()

TAudioSpatializationPtr FAudioDevice::GetSpatializationPluginInterface ( )
inline

Return the spatialization plugin interface.

◆ GetSubsystem() [1/2]

TSubsystemClass * FAudioDevice::GetSubsystem ( ) const
inline

Get a Subsystem of specified type

◆ GetSubsystem() [2/2]

static TSubsystemClass * FAudioDevice::GetSubsystem ( const FAudioDeviceHandle InHandle)
inlinestatic

Get a Subsystem of specified type from the provided AudioDeviceHandle returns nullptr if the Subsystem cannot be found or the AudioDeviceHandle is invalid

◆ GetSubsystemArrayCopy()

TArray< TSubsystemClass * > FAudioDevice::GetSubsystemArrayCopy ( ) const
inline

Gets all Subsystems of specified type, this is only necessary for interfaces that can have multiple implementations instanced at a time.

◆ GetSubsystemBase()

UAudioEngineSubsystem * FAudioDevice::GetSubsystemBase ( TSubclassOf< UAudioEngineSubsystem SubsystemClass) const
inline

Get a Subsystem of specified type

◆ GetTestComponent()

UAudioComponent * FAudioDevice::GetTestComponent ( UWorld InWorld)

◆ GetTransientMasterVolume()

float FAudioDevice::GetTransientMasterVolume ( ) const
inline

◆ GetTransientPrimaryVolume()

float FAudioDevice::GetTransientPrimaryVolume ( ) const
inline

◆ GetWaveInstanceSourceMap()

const TMap< FWaveInstance *, FSoundSource * > & FAudioDevice::GetWaveInstanceSourceMap ( ) const

◆ HandlePause()

void FAudioDevice::HandlePause ( bool  bGameTicking,
bool  bGlobalPause = false 
)
protected

Handle pausing/unpausing of sources when entering or leaving pause mode, or global pause (like device suspend)

◆ HasCompressedAudioInfoClass()

virtual bool FAudioDevice::HasCompressedAudioInfoClass ( USoundWave SoundWave)
inlinevirtual

Whether this SoundWave has an associated info class to decompress it

Reimplemented in Audio::FMixerDevice.

◆ Init()

bool FAudioDevice::Init ( Audio::FDeviceId  InDeviceID,
int32  InMaxSources,
int32  BufferSizeOverride = INDEX_NONE,
int32  NumBuffersOverride = INDEX_NONE 
)

Basic initialization of the platform agnostic layer of the audio system

◆ InitEffect()

void * FAudioDevice::InitEffect ( FSoundSource Source)

Platform dependent call to init effect data on a sound source

◆ InitializeHardware()

virtual bool FAudioDevice::InitializeHardware ( )
inlinevirtual

Starts up any platform specific hardware/APIs

Reimplemented in Audio::FMixerDevice, and FIOSAudioDevice.

◆ InitializeSubsystemCollection()

void FAudioDevice::InitializeSubsystemCollection ( )
protected

Create our subsystem collection root object and initialize subsystems

◆ InitSoundClasses()

void FAudioDevice::InitSoundClasses ( )

Set up the sound class hierarchy

◆ InitSoundSources()

void FAudioDevice::InitSoundSources ( )
protected

Set up the initial sound sources Allows us to initialize sound source early on, allowing for render callback hookups for iOS Audio.

◆ InitSoundSubmixes()

virtual void FAudioDevice::InitSoundSubmixes ( )
inlinevirtual

Initializes sound submixes.

Reimplemented in Audio::FMixerDevice.

◆ InvalidateCachedInteriorVolumes()

void FAudioDevice::InvalidateCachedInteriorVolumes ( ) const

When the set of Audio volumes have changed invalidate the cached values of active sounds

◆ IsAudioDeviceMuted()

bool FAudioDevice::IsAudioDeviceMuted ( ) const

◆ IsBakedAnalaysisQueryingEnabled()

bool FAudioDevice::IsBakedAnalaysisQueryingEnabled ( ) const
inline

Returns if baked analysis querying is enabled.

◆ IsExernalBackgroundSoundActive()

virtual bool FAudioDevice::IsExernalBackgroundSoundActive ( )
inlinevirtual

Check if any background music or sound is playing through the audio device

Reimplemented in Audio::FMixerDevice, and FIOSAudioDevice.

◆ IsHRTFDisabled()

bool FAudioDevice::IsHRTFDisabled ( ) const

Whether or not HRTF is disabled.

◆ IsHRTFEnabledForAll()

bool FAudioDevice::IsHRTFEnabledForAll ( ) const

Whether or not HRTF spatialization is enabled for all.

◆ IsInitialized()

bool FAudioDevice::IsInitialized ( ) const
inlineprotected

Whether the device was initialized.

◆ IsMainAudioDevice()

bool FAudioDevice::IsMainAudioDevice ( ) const

◆ IsModulationPluginEnabled()

bool FAudioDevice::IsModulationPluginEnabled ( ) const
inline

Whether or not there's a modulation plugin enabled.

◆ IsNonRealtime()

virtual bool FAudioDevice::IsNonRealtime ( ) const
inlinevirtual

Reimplemented in Audio::FMixerDevice.

◆ IsOcclusionPluginEnabled()

bool FAudioDevice::IsOcclusionPluginEnabled ( ) const
inline

Whether or not there's an occlusion plugin enabled.

◆ IsOcclusionPluginLoaded()

bool FAudioDevice::IsOcclusionPluginLoaded ( )
static

◆ IsPendingStop()

bool FAudioDevice::IsPendingStop ( FActiveSound ActiveSound)

Whether the provided ActiveSound is currently pending to stop

◆ IsReverbPluginEnabled()

bool FAudioDevice::IsReverbPluginEnabled ( ) const
inline

Whether or not there's a reverb plugin enabled.

◆ IsReverbPluginLoaded()

bool FAudioDevice::IsReverbPluginLoaded ( )
static

◆ IsSourceDataOverridePluginEnabled()

bool FAudioDevice::IsSourceDataOverridePluginEnabled ( ) const
inline

◆ IsSourceDataOverridePluginLoaded()

bool FAudioDevice::IsSourceDataOverridePluginLoaded ( )
static

◆ IsSpatializationPluginEnabled()

bool FAudioDevice::IsSpatializationPluginEnabled ( ) const
inline

Whether or not there's a spatialization plugin enabled.

◆ IsStoppingVoicesEnabled()

bool FAudioDevice::IsStoppingVoicesEnabled ( ) const
inline

Returns if stopping voices is enabled.

◆ IsUsingListenerAttenuationOverride()

bool FAudioDevice::IsUsingListenerAttenuationOverride ( int32  ListenerIndex) const

Returns if the specific listener is using an attenuation override position.

◆ LegacyReverbDisabled()

bool FAudioDevice::LegacyReverbDisabled ( )
static

◆ LocationIsAudible() [1/2]

bool FAudioDevice::LocationIsAudible ( const FVector Location,
const float  MaxDistance 
) const

Checks to see if a coordinate is within a distance of any listener

◆ LocationIsAudible() [2/2]

bool FAudioDevice::LocationIsAudible ( const FVector Location,
int32  ListenerIndex,
const float  MaxDistance 
) const

Checks to see if a coordinate is within a distance of a specific listener

◆ NotifyActiveSoundOcclusionTraceDone()

void FAudioDevice::NotifyActiveSoundOcclusionTraceDone ( FActiveSound ActiveSound,
bool  bIsOccluded 
)

Notify that a pending async occlusion trace finished on the active sound.

◆ NotifyAddActiveSound()

void FAudioDevice::NotifyAddActiveSound ( FActiveSound ActiveSound) const
inlineprotected

◆ NotifyAudioDevicePostRender()

void FAudioDevice::NotifyAudioDevicePostRender ( const FAudioDeviceRenderInfo InInfo)
protected

◆ NotifyAudioDevicePreRender()

void FAudioDevice::NotifyAudioDevicePreRender ( const FAudioDeviceRenderInfo InInfo)
protected

◆ NotifyPendingDelete()

void FAudioDevice::NotifyPendingDelete ( FActiveSound ActiveSound) const
inline

Notifies subsystems an active sound is about to be deleted (called on audio thread) - Deprecated, see NotifySubsystemsActiveSoundDeleting

◆ NotifyPendingDeleteInternal()

void FAudioDevice::NotifyPendingDeleteInternal ( FActiveSound ActiveSound) const
inlineprotected

◆ NotifySubsystemsActiveSoundCreated()

void FAudioDevice::NotifySubsystemsActiveSoundCreated ( FActiveSound ActiveSound) const
protected

Notifies subsystems an active sound has just been added (called on audio thread). Called both for brand new sounds and for virtualized sounds that have just become active.

◆ NotifySubsystemsActiveSoundDeleting()

void FAudioDevice::NotifySubsystemsActiveSoundDeleting ( FActiveSound ActiveSound) const
protected

Notifies subsystems an active sound is about to be deleted (called on audio thread). Called when a sound is either stopped or virtualized. In either case, the referenced ActiveSound object no longer exists after this call; any pointers to it should be discarded.

◆ NotifySubsystemsSetOwner()

void FAudioDevice::NotifySubsystemsSetOwner ( FActiveSound ActiveSound,
const UObject Owner 
) const
protected

◆ NotifySubsystemsVirtualizedSoundCreated()

void FAudioDevice::NotifySubsystemsVirtualizedSoundCreated ( FActiveSound ActiveSound) const
protected

Notifies subsystems a virtualized sound has just been added (called on audio thread). Called both for brand new sounds and for active sounds that have just become virtualized.

◆ NotifySubsystemsVirtualizedSoundDeleting()

void FAudioDevice::NotifySubsystemsVirtualizedSoundDeleting ( FActiveSound ActiveSound) const
protected

Notifies subsystems a virtualized sound is about to be deleted (called on audio thread). Called when a sound is either stopped or re-triggered. In either case, the referenced ActiveSound object no longer exists after this call; any pointers to it should be discarded.

◆ OnDeviceCreated()

void FAudioDevice::OnDeviceCreated ( Audio::FDeviceId  InDeviceID)

Called after FAudioDevice creation and init

◆ OnDeviceDestroyed()

void FAudioDevice::OnDeviceDestroyed ( Audio::FDeviceId  InDeviceID)

Called before FAudioDevice teardown

◆ OnListenerUpdated()

virtual void FAudioDevice::OnListenerUpdated ( const TArray< FListener > &  InListeners)
inlineprotectedvirtual

This is overridden in Audio::FMixerDevice to propogate listener information to the audio thread.

Reimplemented in Audio::FMixerDevice.

◆ OnPreGarbageCollect()

void FAudioDevice::OnPreGarbageCollect ( )

◆ PauseActiveSound()

void FAudioDevice::PauseActiveSound ( uint64  AudioComponentID,
const bool  bInIsPaused 
)

Pauses the active sound for the specified audio component

◆ PlaySoundAtLocation() [1/2]

void FAudioDevice::PlaySoundAtLocation ( USoundBase Sound,
UWorld World,
float  VolumeMultiplier,
float  PitchMultiplier,
float  StartTime,
const FVector Location,
const FRotator Rotation,
USoundAttenuation AttenuationSettings,
USoundConcurrency Concurrency,
TArray< FAudioParameter > &&  Params,
const AActor OwningActor = nullptr 
)

As above, but supporting move semantics to reduce copying of Params

◆ PlaySoundAtLocation() [2/2]

void FAudioDevice::PlaySoundAtLocation ( USoundBase Sound,
UWorld World,
float  VolumeMultiplier,
float  PitchMultiplier,
float  StartTime,
const FVector Location,
const FRotator Rotation,
USoundAttenuation AttenuationSettings = nullptr,
USoundConcurrency ConcurrencySettings = nullptr,
const TArray< FAudioParameter > *  Params = nullptr,
const AActor OwningActor = nullptr 
)

Plays a sound at the given location without creating an audio component.

Parameters
SoundThe USoundBase to play at the location.
WorldThe world this sound is playing in.
VolumeMultiplierThe volume multiplier to set on the sound.
PitchMultiplierThe pitch multiplier to set on the sound.
StartTimeThe initial time offset for the sound.
LocationThe sound's position.
RotationThe sound's rotation.
AttenuationSettingsThe sound's attenuation settings to use (optional). Will default to the USoundBase's AttenuationSettings if not specified.
USoundConcurrencyThe sound's sound concurrency settings to use (optional). Will use the USoundBase's USoundConcurrency if not specified.
ParamsAn optional list of audio component params to immediately apply to a sound.

◆ PlayWhenSilentEnabled()

bool FAudioDevice::PlayWhenSilentEnabled ( ) const
inline

Whether play when silent is enabled for all sounds associated with this audio device

◆ PopSoundMixModifier()

void FAudioDevice::PopSoundMixModifier ( USoundMix SoundMix,
bool  bIsPassive = false 
)

Pop a SoundMix from the Audio Device's list.

Parameters
SoundMixThe SoundMix to pop.
bIsPassiveWhether this is a passive pop from a sound finishing.

◆ Precache()

void FAudioDevice::Precache ( USoundWave SoundWave,
bool  bSynchronous = false,
bool  bTrackMemory = true,
bool  bForceFullDecompression = false 
)
virtual

Precaches the passed in sound node wave object.

Parameters
SoundWaveResource to be precached.
bSynchronousIf true, this function will block until a vorbis decompression is complete
bTrackMemoryIf true, the audio mem stats will be updated
bForceFullDecompressionIf true, the sound wave will be fully decompressed regardless of size.

Precaches the passed in sound node wave object.

Parameters
SoundWaveResource to be precached.

◆ PrecacheStartupSounds()

void FAudioDevice::PrecacheStartupSounds ( )

Precaches all existing sounds. Called when audio setup is complete

◆ PushSoundMixModifier()

void FAudioDevice::PushSoundMixModifier ( USoundMix SoundMix,
bool  bIsPassive = false,
bool  bIsRetrigger = false 
)

Push a SoundMix onto the Audio Device's list.

Parameters
SoundMixThe SoundMix to push.
bIsPassiveWhether this is a passive push from a playing sound.

◆ RegisterPluginListener()

void FAudioDevice::RegisterPluginListener ( const TAudioPluginListenerPtr  PluginListener)

Registers a third party listener-observer to this audio device.

◆ RegisterSoundClass()

void FAudioDevice::RegisterSoundClass ( USoundClass InSoundClass)

Registers a sound class with the audio device

Parameters
SoundClassNamename of sound class to retrieve
Returns
sound class properties if it exists

◆ RegisterSoundSubmix()

virtual void FAudioDevice::RegisterSoundSubmix ( USoundSubmixBase SoundSubmix,
bool  bInit 
)
inlinevirtual

Registers the sound submix

Reimplemented in Audio::FMixerDevice.

◆ RegisterSubmixBufferListener() [1/2]

void FAudioDevice::RegisterSubmixBufferListener ( ISubmixBufferListener InSubmixBufferListener,
USoundSubmix SoundSubmix = nullptr 
)
virtual

Reimplemented in Audio::FMixerDevice.

◆ RegisterSubmixBufferListener() [2/2]

void FAudioDevice::RegisterSubmixBufferListener ( TSharedRef< ISubmixBufferListener, ESPMode::ThreadSafe InSubmixBufferListener,
USoundSubmix SoundSubmix 
)
virtual

Registers the provided submix buffer listener with the given submix.

Reimplemented in Audio::FMixerDevice.

◆ RemoveActiveSound()

void FAudioDevice::RemoveActiveSound ( FActiveSound ActiveSound)

Removes an active sound from the active sounds array

◆ RemoveAudioVolumeProxy()

void FAudioDevice::RemoveAudioVolumeProxy ( uint32  AudioVolumeID)

◆ RemoveEnvelopeFollowerDelegate()

void FAudioDevice::RemoveEnvelopeFollowerDelegate ( USoundSubmix InSubmix,
const FOnSubmixEnvelopeBP OnSubmixEnvelopeBP 
)
virtual

Reimplemented in Audio::FMixerDevice.

◆ RemovePostRenderDelegate()

bool FAudioDevice::RemovePostRenderDelegate ( const FDelegateHandle InHandle)

◆ RemovePreRenderDelegate()

bool FAudioDevice::RemovePreRenderDelegate ( const FDelegateHandle InHandle)

◆ RemoveSoundMix()

void FAudioDevice::RemoveSoundMix ( USoundMix SoundMix)

Removes a sound mix - called when SoundMix is unloaded

◆ RemoveSpectralAnalysisDelegate()

void FAudioDevice::RemoveSpectralAnalysisDelegate ( USoundSubmix InSubmix,
const FOnSubmixSpectralAnalysisBP OnSubmixSpectralAnalysisBP 
)
virtual

Reimplemented in Audio::FMixerDevice.

◆ ResetAudioVolumeProxyChangedState()

void FAudioDevice::ResetAudioVolumeProxyChangedState ( )

◆ ResetInterpolation()

void FAudioDevice::ResetInterpolation ( )

Resets all interpolating values to defaults.

◆ ResumeContext()

virtual void FAudioDevice::ResumeContext ( )
inlinevirtual

Resume any context related objects

Reimplemented in FIOSAudioDevice, and Audio::FMixerDevice.

◆ RetriggerVirtualLoop()

void FAudioDevice::RetriggerVirtualLoop ( FAudioVirtualLoop VirtualLoop)

Attempts to retrigger a provided loop

◆ SendCommandToActiveSounds()

void FAudioDevice::SendCommandToActiveSounds ( uint64  InAudioComponentID,
TUniqueFunction< void(FActiveSound &)>  InFunc,
const TStatId  InStatId = TStatId() 
)

Performs an operation on all active sounds requested to execute by an audio component

◆ SetAudioStateProperty()

void FAudioDevice::SetAudioStateProperty ( const FName PropertyName,
const FName PropertyValue 
)

◆ SetBaseSoundMix()

void FAudioDevice::SetBaseSoundMix ( USoundMix SoundMix)

Sets a new sound mix and applies it to all appropriate sound classes

◆ SetCanHaveMultipleActiveSounds()

void FAudioDevice::SetCanHaveMultipleActiveSounds ( uint64  AudioComponentID,
bool  InCanHaveMultipleActiveSounds 
)

Set whether a given Audio Component ID should be allowed to have multiple associated Active Sounds

◆ SetCurrentSpatializationPlugin()

bool FAudioDevice::SetCurrentSpatializationPlugin ( FName  PluginName)

Set and initialize the current Spatialization plugin (by name)

◆ SetDefaultAudioSettings()

void FAudioDevice::SetDefaultAudioSettings ( UWorld World,
const FReverbSettings DefaultReverbSettings,
const FInteriorSettings DefaultInteriorSettings 
)

Sets the default reverb and interior settings for the provided world

◆ SetDefaultBaseSoundMix()

void FAudioDevice::SetDefaultBaseSoundMix ( USoundMix SoundMix)

Sets the Sound Mix that should be active by default

◆ SetDeviceMuted()

void FAudioDevice::SetDeviceMuted ( bool  bMuted)

◆ SetGlobalFocusSettings()

void FAudioDevice::SetGlobalFocusSettings ( const FGlobalFocusSettings NewFocusSettings)

◆ SetGlobalPitchModulation()

void FAudioDevice::SetGlobalPitchModulation ( float  PitchScale,
float  TimeSec 
)

◆ SetHRTFDisabled()

void FAudioDevice::SetHRTFDisabled ( bool  InIsHRTFDisabled)
inline

◆ SetHRTFEnabledForAll()

void FAudioDevice::SetHRTFEnabledForAll ( bool  InbHRTFEnabledForAll)
inline

◆ SetListener()

void FAudioDevice::SetListener ( UWorld World,
int32  InListenerIndex,
const FTransform ListenerTransform,
float  InDeltaSeconds 
)

Sets the details about the listener

Parameters
WorldThe world the listener is being set on.
ListenerIndexThe index of the listener
ListenerTransformThe listener's world transform
DeltaSecondsThe amount of time over which velocity should be calculated. If 0, then velocity will not be calculated.

◆ SetListenerAttenuationOverride()

void FAudioDevice::SetListenerAttenuationOverride ( int32  ListenerIndex,
const FVector  AttenuationPosition 
)

Sets an override position for the specified listener to do attenuation calculations.

◆ SetMaxChannels()

void FAudioDevice::SetMaxChannels ( int32  InMaxChannels)

Sets the maximum number of channels dynamically. Can't raise the cap over the initial value but can lower it

◆ SetMaxChannelsScaled()

void FAudioDevice::SetMaxChannelsScaled ( float  InScaledChannelCount)

Sets the maximum number of channels dynamically by scaled percentage.

◆ SetMixDebugState()

void FAudioDevice::SetMixDebugState ( EDebugState  DebugState)

◆ SetPlatformAudioHeadroom()

void FAudioDevice::SetPlatformAudioHeadroom ( float  PlatformHeadRoom)

◆ SetSoundClassDistanceScale()

void FAudioDevice::SetSoundClassDistanceScale ( USoundClass InSoundClass,
float  DistanceScale,
float  TimeSec 
)

Overrides the attenuation scale used on a sound class.

◆ SetSoundMixClassOverride()

void FAudioDevice::SetSoundMixClassOverride ( USoundMix InSoundMix,
USoundClass InSoundClass,
float  Volume,
float  Pitch,
float  FadeInTime,
bool  bApplyToChildren 
)

Sets a sound class override in the given sound mix.

◆ SetSoundMixModifiers()

void FAudioDevice::SetSoundMixModifiers ( const TMap< USoundMix *, FSoundMixState > &  InSoundMixModifiers,
const TArray< USoundMix * > &  InPrevPassiveSoundMixModifiers,
USoundMix InDefaultBaseSoundMix 
)
inline

◆ SetSpatializationInterfaceEnabled()

void FAudioDevice::SetSpatializationInterfaceEnabled ( bool  InbSpatializationInterfaceEnabled)
inline

◆ SetSubmixAutoDisable()

virtual void FAudioDevice::SetSubmixAutoDisable ( USoundSubmix InSoundSubmix,
bool  bInAutoDisable 
)
inlinevirtual

Set whether or not a submix is auto-disabled.

Reimplemented in Audio::FMixerDevice.

◆ SetSubmixAutoDisableTime()

virtual void FAudioDevice::SetSubmixAutoDisableTime ( USoundSubmix InSoundSubmix,
float  InDisableTime 
)
inlinevirtual

Set what the auto-disable time is.

Reimplemented in Audio::FMixerDevice.

◆ SetSubmixDryLevel()

virtual void FAudioDevice::SetSubmixDryLevel ( USoundSubmix InSoundSubmix,
float  InDryLevel 
)
inlinevirtual

Set the wet-dry level of the given submix

Reimplemented in Audio::FMixerDevice.

◆ SetSubmixEffectChainOverride()

virtual void FAudioDevice::SetSubmixEffectChainOverride ( USoundSubmix InSoundSubmix,
const TArray< FSoundEffectSubmixPtr > &  InSubmixEffectChain,
float  InCrossfadeTime 
)
inlinevirtual

Sets a submix effect chain override for the given submix

Reimplemented in Audio::FMixerDevice.

◆ SetSubmixModulationBaseLevels()

virtual void FAudioDevice::SetSubmixModulationBaseLevels ( USoundSubmix InSoundSubmix,
float  InVolumeModBase,
float  InWetModBase,
float  InDryModBase 
)
inlinevirtual

Reimplemented in Audio::FMixerDevice.

◆ SetSubmixOutputVolume()

virtual void FAudioDevice::SetSubmixOutputVolume ( USoundSubmix InSoundSubmix,
float  InOutputVolume 
)
inlinevirtual

Set the wet-dry level of the given submix

Reimplemented in Audio::FMixerDevice.

◆ SetSubmixWetDryLevel()

virtual void FAudioDevice::SetSubmixWetDryLevel ( USoundSubmix InSoundSubmix,
float  InOutputVolume,
float  InWetLevel,
float  InDryLevel 
)
inlinevirtual

Set the wet-dry level of the given submix

Reimplemented in Audio::FMixerDevice.

◆ SetSubmixWetLevel()

virtual void FAudioDevice::SetSubmixWetLevel ( USoundSubmix InSoundSubmix,
float  InWetLevel 
)
inlinevirtual

Set the wet-dry level of the given submix

Reimplemented in Audio::FMixerDevice.

◆ SetTransientMasterVolume()

ENGINE_API void FAudioDevice::SetTransientMasterVolume ( float  TransientPrimaryVolume)

◆ SetTransientPrimaryVolume()

void FAudioDevice::SetTransientPrimaryVolume ( float  TransientPrimaryVolume)

◆ SetUseAttenuationForNonGameWorlds()

void FAudioDevice::SetUseAttenuationForNonGameWorlds ( bool  bInUseAttenuationForNonGameWorlds)
inline

Set whether or not we force the use of attenuation for non-game worlds (as by default we only care about game worlds)

◆ ShouldUseRealtimeDecompression()

bool FAudioDevice::ShouldUseRealtimeDecompression ( bool  bForceFullDecompression,
const FSoundGroup SoundGroup,
USoundWave SoundWave,
float  CompressedDurationThreshold 
) const

Returns true if a sound wave should be decompressed.

◆ SoundIsAudible()

bool FAudioDevice::SoundIsAudible ( USoundBase Sound,
const UWorld World,
const FVector Location,
const FSoundAttenuationSettings AttenuationSettingsToApply,
float  MaxDistance,
float  FocusFactor 
) const

Checks if the given sound would be audible.

Parameters
SoundThe sound to check if it would be audible
WorldThe world the sound is playing in
LocationThe location the sound is playing in the world
AttenuationSettingsThe (optional) attenuation settings the sound is using
MaxDistanceThe computed max distance of the sound.
FocusFactorThe focus factor of the sound.
Returns
Returns true if the sound is audible, false otherwise.

◆ SpatializationPluginInterfacesAvailable()

bool FAudioDevice::SpatializationPluginInterfacesAvailable ( )

◆ StartEnvelopeFollowing()

virtual void FAudioDevice::StartEnvelopeFollowing ( USoundSubmix InSubmix)
inlinevirtual

This is called by a USoundSubmix to start envelope following on a submix isntance on this device.

Reimplemented in Audio::FMixerDevice.

◆ StartRecording()

virtual void FAudioDevice::StartRecording ( USoundSubmix InSubmix,
float  ExpectedRecordingDuration 
)
inlinevirtual

This is called by a USoundSubmix to start recording a submix instance on this device.

Reimplemented in Audio::FMixerDevice.

◆ StartSources()

void FAudioDevice::StartSources ( TArray< FWaveInstance * > &  WaveInstances,
int32  FirstActiveIndex,
bool  bGameTicking 
)
protected

Start and/or update any sources that have a high enough priority to play

◆ StartSpectrumAnalysis()

void FAudioDevice::StartSpectrumAnalysis ( USoundSubmix InSubmix,
const FSoundSpectrumAnalyzerSettings InSettings 
)
virtual

Reimplemented in Audio::FMixerDevice.

◆ StopActiveSound() [1/2]

void FAudioDevice::StopActiveSound ( FActiveSound ActiveSound,
const FString *  EventLogID = nullptr 
)

(Deprecated in favor of AddSoundToStop). Stops the active sound

◆ StopActiveSound() [2/2]

void FAudioDevice::StopActiveSound ( uint64  AudioComponentID,
const FString *  EventLogID = nullptr 
)

Removes the active sound for the specified audio component

◆ StopAllSounds()

void FAudioDevice::StopAllSounds ( bool  bShouldStopUISounds = false)
virtual

Stops all game sounds (and possibly UI) sounds

Parameters
bShouldStopUISoundsIf true, this function will stop UI sounds as well

◆ StopEnvelopeFollowing()

virtual void FAudioDevice::StopEnvelopeFollowing ( USoundSubmix InSubmix)
inlinevirtual

This is called by a USoundSubmix when we stop envelope following a submix instance on this device.

Reimplemented in Audio::FMixerDevice.

◆ StopRecording()

virtual Audio::FAlignedFloatBuffer & FAudioDevice::StopRecording ( USoundSubmix InSubmix,
float OutNumChannels,
float OutSampleRate 
)
inlinevirtual

This is called by a USoundSubmix when we stop recording a submix on this device.

Reimplemented in Audio::FMixerDevice.

◆ StopSoundsUsingResource()

void FAudioDevice::StopSoundsUsingResource ( USoundWave SoundWave,
TArray< UAudioComponent * > *  StoppedComponents = nullptr 
)

Stop any playing sounds that are using a particular SoundWave

Parameters
SoundWaveResource to stop any sounds that are using it
[out]StoppedComponentsList of Audio Components that were stopped

◆ StopSources()

void FAudioDevice::StopSources ( TArray< FWaveInstance * > &  WaveInstances,
int32  FirstActiveIndex 
)
protected

Stop sources that need to be stopped, and touch the ones that need to be kept alive Stop sounds that are too low in priority to be played

◆ StopSourcesUsingBuffer()

void FAudioDevice::StopSourcesUsingBuffer ( FSoundBuffer SoundBuffer)

Stops any sound sources which are using the given buffer.

Parameters
FSoundBufferBuffer to check against

◆ StopSpectrumAnalysis()

void FAudioDevice::StopSpectrumAnalysis ( USoundSubmix InSubmix)
virtual

Reimplemented in Audio::FMixerDevice.

◆ StopTestComponent()

void FAudioDevice::StopTestComponent ( )

◆ SupportsRealtimeDecompression()

virtual bool FAudioDevice::SupportsRealtimeDecompression ( ) const
inlinevirtual

Whether this device supports realtime decompression of sound waves (i.e. DTYPE_RealTime)

◆ Suspend()

void FAudioDevice::Suspend ( bool  bGameTicking)

Suspend/resume all sounds (global pause for device suspend/resume, etc.)

Parameters
bGameTickingWhether the game is still ticking at the time of suspend

◆ SuspendContext()

virtual void FAudioDevice::SuspendContext ( )
inlinevirtual

Suspend any context related objects

Reimplemented in FIOSAudioDevice, and Audio::FMixerDevice.

◆ Teardown()

void FAudioDevice::Teardown ( )

Tears down the audio device

◆ TeardownHardware()

virtual void FAudioDevice::TeardownHardware ( )
inlinevirtual

Shuts down any platform specific hardware/APIs

Reimplemented in Audio::FMixerDevice, and FIOSAudioDevice.

◆ UnlinkActiveSoundFromComponent()

void FAudioDevice::UnlinkActiveSoundFromComponent ( const FActiveSound InActiveSound)

Disables ActiveSound from responding to calls from its associated AudioComponent.

◆ UnregisterPluginListener()

void FAudioDevice::UnregisterPluginListener ( const TAudioPluginListenerPtr  PluginListener)

Unregisters a third party listener-observer to this audio device.

◆ UnregisterSoundClass()

void FAudioDevice::UnregisterSoundClass ( USoundClass SoundClass)

Unregisters a sound class

◆ UnregisterSoundSubmix()

virtual void FAudioDevice::UnregisterSoundSubmix ( const USoundSubmixBase SoundSubmix,
const bool  bReparentChildren 
)
inlinevirtual

Unregisters the sound submix

Reimplemented in Audio::FMixerDevice.

◆ UnregisterSubmixBufferListener() [1/2]

void FAudioDevice::UnregisterSubmixBufferListener ( ISubmixBufferListener InSubmixBufferListener,
USoundSubmix SoundSubmix = nullptr 
)
virtual

Reimplemented in Audio::FMixerDevice.

◆ UnregisterSubmixBufferListener() [2/2]

void FAudioDevice::UnregisterSubmixBufferListener ( TSharedRef< ISubmixBufferListener, ESPMode::ThreadSafe InSubmixBufferListener,
USoundSubmix SoundSubmix 
)
virtual

Unregisters the provided submix buffer listener with the given submix.

Reimplemented in Audio::FMixerDevice.

◆ Update()

void FAudioDevice::Update ( bool  bGameTicking)

The audio system's main "Tick" function

◆ UpdateActiveSoundPlaybackTime()

void FAudioDevice::UpdateActiveSoundPlaybackTime ( bool  bIsTimeTicking)

Update the active sound playback time. This is done here to do after all audio is updated.

◆ UpdateAudioVolumeProxy()

void FAudioDevice::UpdateAudioVolumeProxy ( const FAudioVolumeProxy Proxy)

◆ UpdateDeviceDeltaTime()

virtual void FAudioDevice::UpdateDeviceDeltaTime ( )
inlinevirtual

Sets the update delta time for the audio frame

Reimplemented in Audio::FMixerDevice, and FIOSAudioDevice.

◆ UpdateEffect()

void * FAudioDevice::UpdateEffect ( FSoundSource Source)

Platform dependent call to update the sound output with new parameters The audio system's main "Tick" function

◆ UpdateGameThread()

virtual void FAudioDevice::UpdateGameThread ( )
inlinevirtual

Update called on game thread.

Reimplemented in Audio::FMixerDevice.

◆ UpdateHardware()

virtual void FAudioDevice::UpdateHardware ( )
inlinevirtual

Lets the platform any tick actions

Reimplemented in Audio::FMixerDevice, and FIOSAudioDevice.

◆ UpdateHardwareTiming()

virtual void FAudioDevice::UpdateHardwareTiming ( )
inlinevirtual

Updates timing information for hardware.

Reimplemented in Audio::FMixerDevice.

◆ UpdateSourceEffectChain()

virtual void FAudioDevice::UpdateSourceEffectChain ( const uint32  SourceEffectChainId,
const TArray< FSourceEffectChainEntry > &  SourceEffectChain,
const bool  bPlayEffectChainTails 
)
inlinevirtual

Updates the source effect chain. Only implemented in audio mixer.

Reimplemented in Audio::FMixerDevice.

◆ UpdateSubmixModulationSettings() [1/2]

virtual void FAudioDevice::UpdateSubmixModulationSettings ( USoundSubmix InSoundSubmix,
const TSet< TObjectPtr< USoundModulatorBase > > &  InOutputModulation,
const TSet< TObjectPtr< USoundModulatorBase > > &  InWetLevelModulation,
const TSet< TObjectPtr< USoundModulatorBase > > &  InDryLevelModulation 
)
inlinevirtual

Reimplemented in Audio::FMixerDevice.

◆ UpdateSubmixModulationSettings() [2/2]

virtual void FAudioDevice::UpdateSubmixModulationSettings ( USoundSubmix InSoundSubmix,
USoundModulatorBase InOutputModulation,
USoundModulatorBase InWetLevelModulation,
USoundModulatorBase InDryLevelModulation 
)
inlinevirtual

◆ UpdateSubmixProperties()

virtual void FAudioDevice::UpdateSubmixProperties ( USoundSubmixBase InSubmix)
inlinevirtual

Updates the submix properties of any playing submix instances. Allows editor to make changes to submix properties and hear them propagate live.

Reimplemented in Audio::FMixerDevice.

◆ UpdateVirtualLoops()

void FAudioDevice::UpdateVirtualLoops ( bool  bForceUpdate)

◆ ValidateAPICall()

virtual bool FAudioDevice::ValidateAPICall ( const TCHAR Function,
uint32  ErrorCode 
)
inlinevirtual

Check for errors and output a human readable string

Reimplemented in Audio::FMixerDevice.

Friends And Related Symbol Documentation

◆ FAudioEffectsManager

◆ FSoundConcurrencyManager

◆ FSoundSource

friend class FSoundSource
friend

Member Data Documentation

◆ AudioClock

double FAudioDevice::AudioClock
protected

The audio clock from the audio hardware. Not supported on all platforms.

◆ bAllowCenterChannel3DPanning

uint8 FAudioDevice::bAllowCenterChannel3DPanning
protected

Whether or not we allow center channel panning (audio mixer only feature.)

◆ bAudioMixerModuleLoaded

uint8 FAudioDevice::bAudioMixerModuleLoaded

Whether or not the audio mixer module is being used by this device.

◆ bDisableAudioCaching

uint8 FAudioDevice::bDisableAudioCaching

HACK: Temporarily disable audio caching. This will be done better by changing the decompression pool size in the future

◆ bIsAudioDeviceHardwareInitialized

uint8 FAudioDevice::bIsAudioDeviceHardwareInitialized

Whether or not the lower-level audio device hardware initialized.

◆ bIsBakedAnalysisEnabled

uint8 FAudioDevice::bIsBakedAnalysisEnabled

If baked analysis querying is enabled.

◆ bIsStoppingVoicesEnabled

uint8 FAudioDevice::bIsStoppingVoicesEnabled

◆ bOcclusionIsExternalSend

uint8 FAudioDevice::bOcclusionIsExternalSend

Whether or not various audio plugin interfaces are external sends.

◆ bReverbIsExternalSend

uint8 FAudioDevice::bReverbIsExternalSend

◆ bSpatializationIsExternalSend

uint8 FAudioDevice::bSpatializationIsExternalSend

◆ CurrentSpatializationInterfaceInfoPtr

FAudioSpatializationInterfaceInfo* FAudioDevice::CurrentSpatializationInterfaceInfoPtr = nullptr
protected

◆ CurrentSpatializationPluginInterfaceName

FName FAudioDevice::CurrentSpatializationPluginInterfaceName
protected

3rd party audio spatialization interface.

◆ DeviceCreatedHandle

FDelegateHandle FAudioDevice::DeviceCreatedHandle
protected

◆ DeviceDeltaTime

float FAudioDevice::DeviceDeltaTime
protected

◆ DeviceDestroyedHandle

FDelegateHandle FAudioDevice::DeviceDestroyedHandle
protected

◆ DeviceID

Audio::FDeviceId FAudioDevice::DeviceID

The handle for this audio device used in the audio device manager.

◆ Effects

FAudioEffectsManager* FAudioDevice::Effects
protected

Interface to audio effects processing

◆ FreeSources

TArray<FSoundSource*> FAudioDevice::FreeSources
protected

◆ ListenerProxies

TArray<FListenerProxy> FAudioDevice::ListenerProxies

◆ Listeners

TArray<FListener> FAudioDevice::Listeners
protected

◆ MaxChannelsSupportedBySpatializationPlugin

int32 FAudioDevice::MaxChannelsSupportedBySpatializationPlugin

Max amount of channels a source can be to be spatialized by our active spatialization plugin.

◆ ModulationInterface

TAudioModulationPtr FAudioDevice::ModulationInterface

3rd party modulation interface

◆ NumPrecacheFrames

int32 FAudioDevice::NumPrecacheFrames

The number of frames to precache.

◆ NumStoppingSources

int32 FAudioDevice::NumStoppingSources

The number of sources to reserve for stopping sounds.

◆ OcclusionInterface

TAudioOcclusionPtr FAudioDevice::OcclusionInterface

3rd party occlusion interface.

◆ OnAudioDevicePostRender

FOnAudioDevicePostRender FAudioDevice::OnAudioDevicePostRender
protected

◆ OnAudioDevicePreRender

FOnAudioDevicePreRender FAudioDevice::OnAudioDevicePreRender
protected

◆ PlatformSettings

FAudioPlatformSettings FAudioDevice::PlatformSettings

The platform specific audio settings.

◆ PluginInitializationParams

FAudioPluginInitializationParams FAudioDevice::PluginInitializationParams
protected

Cached parameters passed to the initialization of various audio plugins

◆ PluginListeners

TArray<TAudioPluginListenerPtr> FAudioDevice::PluginListeners

3rd party listener observers registered to this audio device.

◆ RenderStateCallbackListCritSec

FCriticalSection FAudioDevice::RenderStateCallbackListCritSec
protected

◆ ReverbPluginInterface

TAudioReverbPtr FAudioDevice::ReverbPluginInterface

3rd party reverb interface.

◆ SampleRate

int32 FAudioDevice::SampleRate

The sample rate of all the audio devices

◆ SourceDataOverridePluginInterface

TAudioSourceDataOverridePtr FAudioDevice::SourceDataOverridePluginInterface

3rd party source data override interface.

◆ Sources

TArray<FSoundSource*> FAudioDevice::Sources
protected

◆ SpatializationInterfaces

TArray<FAudioSpatializationInterfaceInfo> FAudioDevice::SpatializationInterfaces
protected

◆ SpatializationPluginInterface

TAudioSpatializationPtr FAudioDevice::SpatializationPluginInterface = nullptr

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