Class for managing multiple audio devices. 更多...
#include <AudioDeviceManager.h>
Public 成员函数 | |
| void | AddReferencedObjects (FReferenceCollector &Collector) |
| Tracks objects in the active audio devices. | |
| bool | CreateMainAudioDevice () |
| Creates the main audio device. | |
| FAudioDeviceManager () | |
| Constructor | |
| void | FreeBufferResource (FSoundBuffer *SoundBuffer) |
| Frees the sound buffer from the device manager. | |
| void | FreeResource (USoundWave *SoundWave) |
| Frees the given sound wave resource from the device manager | |
| FAudioDeviceHandle | GetActiveAudioDevice () |
| Returns a ptr to the active audio device. 更多... | |
| FAudioDeviceHandle | GetAudioDevice (Audio::FDeviceId InDeviceID) |
| Returns a strong handle to the audio device associated with the given device ID. 更多... | |
| IAudioDeviceModule * | GetAudioDeviceModule () |
| returns the currently used audio device module for this platform. 更多... | |
| FAudioDevice * | GetAudioDeviceRaw (Audio::FDeviceId InDeviceID) |
| Returns a raw ptr to the audio device associated with the handle. 更多... | |
| TArray< FAudioDevice * > | GetAudioDevices () |
| Returns all the audio devices managed by device manager. | |
| float | GetDynamicSoundVolume (ESoundType SoundType, const FName &SoundName) const |
| Get, reset, or set a sound cue trim | |
| FAudioDeviceHandle | GetMainAudioDeviceHandle () const |
| Returns the handle to the main audio device. | |
| uint8 | GetNumActiveAudioDevices () const |
| Returns the current number of active audio devices. | |
| uint8 | GetNumMainAudioDeviceWorlds () const |
| Returns the number of worlds (e.g. 更多... | |
| FSoundBuffer * | GetSoundBufferForResourceID (uint32 ResourceID) |
| Retrieves the sound buffer for the given resource id | |
| void | InitSoundClasses () |
| Initializes the sound class for all active devices. | |
| void | InitSoundEffectPresets () |
| Initialize all sound effect presets. | |
| void | InitSoundSubmixes () |
| Initializes the sound mixes for all active devices. | |
| bool | IsAlwaysPlayNonRealtimeDeviceAudio () const |
| Gets whether or not non-realtime devices should play their audio. | |
| bool | IsPlayAllDeviceAudio () const |
| Gets whether or not all devices should play their audio. | |
| bool | IsUsingAudioMixer () const |
| Returns true if we're currently using the audio mixer. | |
| bool | IsValidAudioDevice (Audio::FDeviceId DeviceID) const |
| Returns whether the audio device handle is valid (i.e. 更多... | |
| bool | IsVisualizeDebug3dEnabled () const |
| Is debug visualization of 3d sounds enabled | |
| void | RegisterSoundClass (USoundClass *SoundClass) |
| Registers the Sound Class for all active devices. | |
| void | RegisterSoundSubmix (const USoundSubmixBase *SoundSubmix) |
| Registers the Sound Mix for all active devices. | |
| void | RegisterWorld (UWorld *InWorld, Audio::FDeviceId DeviceId) |
| Registers the world with the provided device Id | |
| void | RemoveSoundBufferForResourceID (uint32 ResourceID) |
| Removes the sound buffer for the given resource id | |
| void | RemoveSoundMix (USoundMix *SoundMix) |
| Removes sound mix from all audio devices | |
| FAudioDeviceHandle | RequestAudioDevice (const FAudioDeviceParams &InParams) |
| Creates or requests an audio device instance internally and returns a handle to the audio device. 更多... | |
| void | ResetAllDynamicSoundVolumes () |
| Reset all sound cue trims | |
| void | SetActiveDevice (uint32 InAudioDeviceHandle) |
| Sets which audio device is the active audio device. | |
| void | SetAudioDevice (UWorld &InWorld, Audio::FDeviceId InDeviceID) |
| Sets the device associated with the given world. | |
| void | SetSoloDevice (Audio::FDeviceId InAudioDeviceHandle) |
| Sets an audio device to be solo'd | |
| void | StopSoundsUsingResource (class USoundWave *InSoundWave, TArray< UAudioComponent * > *StoppedComponents=nullptr) |
| Stops sounds using the given resource on all audio devices. | |
| void | StopSourcesUsingBuffer (FSoundBuffer *Buffer) |
| Stops using the given sound buffer. 更多... | |
| void | TogglePlayAllDeviceAudio () |
| Toggles playing audio for all active PIE sessions (and all devices). | |
| void | ToggleVisualize3dDebug () |
| Toggles 3d visualization of 3d sounds on/off | |
| void | TrackResource (USoundWave *SoundWave, FSoundBuffer *Buffer) |
| Links up the resource data indices for looking up and cleaning up. | |
| void | UnregisterSoundClass (USoundClass *SoundClass) |
| Unregisters the Sound Class for all active devices. | |
| void | UnregisterSoundSubmix (const USoundSubmixBase *SoundSubmix) |
| Registers the Sound Mix for all active devices. | |
| void | UnregisterWorld (UWorld *InWorld, Audio::FDeviceId DeviceId) |
| Unregisters the world from the provided device Id | |
| void | UpdateActiveAudioDevices (bool bGameTicking) |
| Updates all active audio devices | |
| void | UpdateSourceEffectChain (const uint32 SourceEffectChainId, const TArray< FSourceEffectChainEntry > &SourceEffectChain, const bool bPlayEffectChainTails) |
| Updates source effect chain on all sources currently using the source effect chain. | |
| void | UpdateSubmix (USoundSubmixBase *SoundSubmix) |
| Updates this submix for any changes made. 更多... | |
| ~FAudioDeviceManager () | |
| Destructor | |
静态 Public 成员函数 | |
| static bool | Initialize () |
| Initialize the audio device manager. 更多... | |
Public 属性 | |
| TArray< FSoundBuffer * > | Buffers |
| Array of all created buffers | |
| TMap< int32, FSoundBuffer * > | WaveBufferMap |
| Look up associating a USoundWave's resource ID with sound buffers | |
Class for managing multiple audio devices.
| FAudioDeviceHandle FAudioDeviceManager::GetActiveAudioDevice | ( | ) |
Returns a ptr to the active audio device.
If there is no active device then it will return the main audio device.
| FAudioDeviceHandle FAudioDeviceManager::GetAudioDevice | ( | Audio::FDeviceId | InDeviceID | ) |
Returns a strong handle to the audio device associated with the given device ID.
if the device ID is invalid returns an invalid, zeroed handle.
| IAudioDeviceModule * FAudioDeviceManager::GetAudioDeviceModule | ( | ) |
returns the currently used audio device module for this platform.
returns nullptr if Initialize() has not been called yet.
| FAudioDevice * FAudioDeviceManager::GetAudioDeviceRaw | ( | Audio::FDeviceId | InDeviceID | ) |
Returns a raw ptr to the audio device associated with the handle.
If the handle is invalid then a NULL device ptr will be returned.
| uint8 FAudioDeviceManager::GetNumMainAudioDeviceWorlds | ( | ) | const |
Returns the number of worlds (e.g.
PIE viewports) using the main audio device.
|
static |
Initialize the audio device manager.
Return true if successfully initialized.
| bool FAudioDeviceManager::IsValidAudioDevice | ( | Audio::FDeviceId | DeviceID | ) | const |
Returns whether the audio device handle is valid (i.e.
points to an actual audio device instance)
| FAudioDeviceHandle FAudioDeviceManager::RequestAudioDevice | ( | const FAudioDeviceParams & | InParams | ) |
Creates or requests an audio device instance internally and returns a handle to the audio device.
This audio device is guaranteed to be alive as long as the returned handle is in scope.
| void FAudioDeviceManager::StopSourcesUsingBuffer | ( | FSoundBuffer * | Buffer | ) |
Stops using the given sound buffer.
Called before freeing the buffer
| void FAudioDeviceManager::UpdateSubmix | ( | USoundSubmixBase * | SoundSubmix | ) |
Updates this submix for any changes made.
Broadcasts to all submix instances.