FAudioDeviceManager

Class for managing multiple audio devices.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/AudioDeviceManager.h

Include

#include "AudioDeviceManager.h"

Syntax

class FAudioDeviceManager

Remarks

Class for managing multiple audio devices.

Variables

Name Description

Public variable

TArray < FSoundB ...

 

Buffers

Array of all created buffers

Public variable

TMap < int32 , FS ...

 

WaveBufferMap

Look up associating a USoundWave 's resource ID with sound buffers

Constructors

Name Description

Public function

FAudioDeviceManager()

Constructor

Destructors

Name Description

Public function

~FAudioDeviceManager()

Destructor

Functions

Name Description

Public function

void

 

AddReferencedObjects

(
    FReferenceCollector & Collector
)

Tracks objects in the active audio devices.

Public function

void

 

FreeBufferResource

(
    FSoundBuffer * SoundBuffer
)

Frees the sound buffer from the device manager.

Public function

void

 

FreeResource

(
    USoundWave * SoundWave
)

Frees the given sound wave resource from the device manager

Public function Static

FAudioDevice ...

 

Get()

Public function

FAudioDevice ...

 

GetActiveAudioDevice()

Returns a ptr to the active audio device.

Public function

FAudioDevice ...

 

GetAudioDevice

(
    Audio::FDeviceId DeviceID
)

Returns a strong handle to the audio device associated with the given device ID.

Public function

IAudioDevice ...

 

GetAudioDeviceModule()

Returns the currently used audio device module for this platform.

Public function

FAudioDevice ...

 

GetAudioDeviceRaw

(
    Audio::FDeviceId DeviceID
)

Returns a raw ptr to the audio device associated with the handle.

Public function

TArray < FAud ...

 

GetAudioDevices()

Returns all the audio devices managed by device manager.

Public function Const

const FAudio ...

 

GetDebugger()

Get the audio debugger instance

Public function

FAudioDebugg ...

 

GetDebugger()

Get the audio debugger instance

Public function

FAudioDevice ...

 

GetDefaultParamsForNewWorld()

Public function Const

float

 

GetDynamicSoundVolume

(
    ESoundType SoundType,
    const FName & SoundName
)

Get, reset, or set a sound cue trim

Public function Const

FAudioDevice ...

 

GetMainAudioDeviceHandle()

Returns the handle to the main audio device.

Public function Const

Audio::FDevi ...

 

GetMainAudioDeviceID()

Public function Const

uint8

 

GetNumActiveAudioDevices()

Returns the current number of active audio devices.

Public function Const

uint8

 

GetNumMainAudioDeviceWorlds()

Returns the number of worlds (e.g. PIE viewports) using the main audio device.

Public function

FSoundBuffer ...

 

GetSoundBufferForResourceID

(
    uint32 ResourceID
)

Retrieves the sound buffer for the given resource id

Public function

TArray < UWor ...

 

GetWorldsUsingAudioDevice

(
    const Audio::FDeviceId & InID
)

Public function

bool

 

Initialize()

Initialize the audio device manager. Return true if successfully initialized.

Public function

void

 

InitSoundClasses()

Initializes the sound class for all active devices.

Public function

void

 

InitSoundEffectPresets()

Initialize all sound effect presets.

Public function

void

 

InitSoundSubmixes()

Initializes the sound mixes for all active devices.

Public function Const

bool

 

IsPlayAllDeviceAudio()

Gets whether or not all devices should play their audio.

Public function Const

bool

 

IsUsingAudioMixer()

Returns true if we're currently using the audio mixer.

Public function Const

bool

 

IsValidAudioDevice

(
    Audio::FDeviceId DeviceID
)

Returns whether the audio device handle is valid (i.e. points to an actual audio device instance)

Public function Const

bool

 

IsVisualizeDebug3dEnabled()

Is debug visualization of 3d sounds enabled

Public function Const

void

 

IterateOverAllDevices

(
    TFunction < void , c...
)

Public function

void

 

IterateOverAllDevices

(
    TFunction < void , F ...
)

Public function

void

 

LogListOfAudioDevices()

Public function

void

 

RegisterSoundClass

(
    USoundClass * SoundClass
)

Registers the Sound Class for all active devices.

Public function

void

 

RegisterSoundSubmix

(
    const USoundSubmixBase * SoundS...
)

Registers the Sound Mix for all active devices.

Public function

void

 

RemoveSoundBufferForResourceID

(
    uint32 ResourceID
)

Removes the sound buffer for the given resource id

Public function

void

 

RemoveSoundMix

(
    USoundMix * SoundMix
)

Removes sound mix from all audio devices

Public function

FAudioDevice ...

 

RequestAudioDevice

(
    const FAudioDeviceParams & InParams
)

Creates or requests an audio device instance internally and returns a handle to the audio device.

Public function

void

 

ResetAllDynamicSoundVolumes()

Reset all sound cue trims

Public function

void

 

ResetDynamicSoundVolume

(
    ESoundType SoundType,
    const FName & SoundName
)

Public function

void

 

SetActiveDevice

(
    uint32 InAudioDeviceHandle
)

Sets which audio device is the active audio device.

Public function

void

 

SetDynamicSoundVolume

(
    ESoundType SoundType,
    const FName & SoundName,
    float Volume
)

Public function

void

 

SetSoloDevice

(
    Audio::FDeviceId InAudioDeviceHandl...
)

Sets an audio device to be solo'd

Public function

void

 

StopSoundsUsingResource

(
    USoundWave * InSoundWave,
    TArray < UAudioComponent * >...
)

Stops sounds using the given resource on all audio devices.

Public function

void

 

StopSourcesUsingBuffer

(
    FSoundBuffer * Buffer
)

Stops using the given sound buffer. Called before freeing the buffer

Public function

void

 

TogglePlayAllDeviceAudio()

Toggles playing audio for all active PIE sessions (and all devices).

Public function

void

 

ToggleVisualize3dDebug()

Toggles 3d visualization of 3d sounds on/off

Public function

void

 

TrackResource

(
    USoundWave * SoundWave,
    FSoundBuffer * Buffer
)

Links up the resource data indices for looking up and cleaning up.

Public function

void

 

UnregisterSoundClass

(
    USoundClass * SoundClass
)

Unregisters the Sound Class for all active devices.

Public function

void

 

UnregisterSoundSubmix

(
    const USoundSubmixBase * SoundS...
)

Registers the Sound Mix for all active devices.

Public function

void

 

UpdateActiveAudioDevices

(
    bool bGameTicking
)

Updates all active audio devices

Public function

void

 

UpdateSourceEffectChain

(
    const uint32 SourceEffectChainId,
    const TArray < FSourceEffectChainEnt ...,
    const bool bPlayEffectChainTails
)

Updates source effect chain on all sources currently using the source effect chain.

Public function

void

 

UpdateSubmix

(
    USoundSubmixBase * SoundSubmix
)

Updates this submix for any changes made. Broadcasts to all submix instances.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

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

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

Post Feedback