Navigation
API > API/Runtime > API/Runtime/AudioMixer
Inheritance Hierarchy
- IAudioMixer
- FMixerDevice
References
| Module | AudioMixer |
| Header | /Engine/Source/Runtime/AudioMixer/Public/AudioMixerDevice.h |
| Include | #include "AudioMixerDevice.h" |
Syntax
class FMixerDevice :
public FAudioDevice,
public Audio::IAudioMixer,
public FGCObject
Variables
| Type | Name | Description | |
|---|---|---|---|
| TArray< FTransform > | ListenerTransforms | ||
| FQuartzClockManager | QuantizedEventClockManager | Clock Manager for quantized event handling on Audio Render Thread. | |
| FCriticalSection | QuartzPersistentStateCritSec | Technically, in editor, multiple UQuartz(World)Subsystem's will reference the same FMixerDevice object. | |
| TSharedPtr< FPersistentQuartzSubsystemData, ESPMode::ThreadSafe > | QuartzSubsystemData | Keep a reference alive to UQuartzSubsystem state that needs to persist across level transitions (UWorld destruction. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FMixerDevice
(
IAudioMixerPlatformInterface* InAudioMixerPlatform |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddMasterSubmixEffect
(
FSoundEffectSubmixPtr SoundEffect |
Add submix effect to master submix. | |
| int32 | AddSubmixEffect
(
USoundSubmix* InSoundSubmix, |
Add submix effect to given submix. | |
| void | AudioRenderThreadCommand
(
TFunction< void()> Command |
Pushes the command to a audio render thread command queue to be executed on render thread. | |
| void | |||
| void | Functions which check the thread it's called on and helps make sure functions are called from correct threads. | ||
| void | Clear all submix effects from master submix. | ||
| void | ClearSubmixEffects
(
USoundSubmix* InSoundSubmix |
Clear all submix effects from given submix. | |
| void | CreateSynchronizedAudioTaskQueue
(
AudioTaskQueueId QueueId |
Creates a queue for audio decode requests with a specific Id. | |
| void | DestroySynchronizedAudioTaskQueue
(
AudioTaskQueueId QueueId, |
Destroys an audio decode task queue. Tasks currently queued up are optionally started. | |
| FMixerSubmixPtr | FindSubmixInstanceByObjectId
(
uint32 InObjectId |
||
| void | GameThreadMPSCCommand
(
TFunction< void()> InCommand |
Pushes the command to a MPSC queue to be executed on the game thread. | |
| void | Get2DChannelMap
(
bool bIsVorbis, |
Builds a channel gain matrix for a non-spatialized source. The non-static variation of this function queries AudioMixerDevice->NumOutputChannels directly which may not be thread safe. | |
| void | Get2DChannelMap
(
bool bIsVorbis, |
Builds a channel gain matrix for a non-spatialized source. The non-static variation of this function queries AudioMixerDevice->NumOutputChannels directly which may not be thread safe. | |
| void | Get3DChannelMap
(
const int32 InSubmixNumChannels, |
Builds a 3D channel map for a spatialized source. | |
| double | |||
| IAudioLinkFactory * | AudioLink. | ||
| IAudioMixerPlatformInterface * | Retrieve a pointer to the currently active platform. Only use this if you know what you are doing. The returned IAudioMixerPlatformInterface will only be alive as long as this FMixerDevice is alive. | ||
| double | |||
| double | Audio thread tick timing relative to audio render thread timing. | ||
| FMixerSubmixWeakPtr | |||
| const TArray< EAudioMixerChannel::Type > & | Returns the channel array for the given submix channel type. | ||
| const FChannelPositionInfo * | Retrieves spherical locations of channels for a given submix format. | ||
| TArray< Audio::FChannelPositionInfo > * | GetDefaultPositionMap
(
int32 NumChannels |
||
| int32 | |||
| int32 | |||
| ISoundfieldFactory * | GetFactoryForSubmixInstance
(
USoundSubmix* SoundSubmix |
If SoundSubmix is a soundfield submix, this will return the factory used to encode source audio to it's soundfield format. | |
| ISoundfieldFactory * | GetFactoryForSubmixInstance
(
FMixerSubmixWeakPtr& SoundSubmixPtr |
If SoundSubmix is a soundfield submix, this will return the factory used to encode source audio to it's soundfield format. | |
| const TArray< FTransform > * | Retrieves the listener transforms. | ||
| FMixerSubmixWeakPtr | |||
| FMixerSubmixWeakPtr | |||
| FMixerSubmixWeakPtr | |||
| FMixerSourceVoice * | Public Functions. | ||
| EMonoChannelUpmixMethod | |||
| int32 | |||
| int32 | |||
| int32 | |||
| int32 | |||
| const FAudioPlatformDeviceInfo & | |||
| const FMixerSourceManager * | |||
| FMixerSourceManager * | |||
| FMixerSubmixWeakPtr | GetSubmixInstance
(
const USoundSubmixBase* SoundSubmix |
||
| bool | |||
| bool | IsEndpointSubmix
(
const USoundSubmixBase* InSubmix |
||
| int | KickQueuedTasks
(
AudioTaskQueueId QueueId |
"Kicks" all of the audio decode tasks currentlyt in the queue. | |
| FPatchOutputStrongPtr | MakePatch
(
int32 InFrames, |
||
| void | PauseRecording
(
USoundSubmix* InSubmix |
||
| void | ReleaseMixerSourceVoice
(
FMixerSourceVoice* InSourceVoice |
||
| void | RemoveMasterSubmixEffect
(
uint32 SubmixEffectId |
Remove submix effect from master submix. | |
| void | RemoveSubmixEffect
(
USoundSubmix* InSoundSubmix, |
Remove submix effect to given submix. | |
| void | RemoveSubmixEffectAtIndex
(
USoundSubmix* InSoundSubmix, |
Remove submix effect at the given submix chain index. | |
| void | ReplaceSoundEffectSubmix
(
USoundSubmix* InSoundSubmix, |
Replace the submix effect of the given submix at the submix chain index with the new submix effect id and submix instance. | |
| void | ResumeRecording
(
USoundSubmix* InSubmix |
Overridden from FAudioDevice
| Type | Name | Description | |
|---|---|---|---|
| void | AddEnvelopeFollowerDelegate
(
USoundSubmix* InSubmix, |
Adds an envelope follower delegate to the submix for this audio device. | |
| FPatchOutputStrongPtr | AddPatchForSubmix
(
uint32 InObjectId, |
||
| void | AddSpectralAnalysisDelegate
(
USoundSubmix* InSubmix, |
||
| void | ClearSubmixEffectChainOverride
(
USoundSubmix* InSoundSubmix, |
Clears all submix effect chain overrides from the submix. | |
| void | CountBytes
(
FArchive& Ar |
Counts the bytes for the structures used in this class | |
| FAudioEffectsManager * | Creates a new platform specific sound source | ||
| FSoundSource * | Creates a new platform specific sound source | ||
| bool | Whether or not the platform disables caching of decompressed PCM data (i.e. to save memory on fixed memory platforms | ||
| void | Enables the audio device to output debug audio to test audio device output. | ||
| void | FadeIn () |
||
| void | FadeOut () |
Optional fadeout and fade in of audio to avoid clicks when closing or opening/reusing audio device. | |
| void | FlushAudioRenderingCommands
(
bool bPumpSynchronously |
Allows audio rendering command queue to flush during audio device flush. | |
| void | FlushExtended
(
UWorld* WorldToFlush, |
Derived classes can override this method to do their own cleanup. | |
| void | GetAudioDeviceList
(
TArray< FString >& OutAudioDeviceNames |
Returns an array of available audio devices names for the platform | |
| double | GetAudioTime () |
Return the audio stream time | |
| bool | GetCurrentSourceEffectChain
(
const uint32 SourceEffectChainId, |
Returns the current source effect chain entries set dynamically from BP or elsewhere. | |
| void | GetMagnitudesForFrequencies
(
USoundSubmix* InSubmix, |
||
| int32 | Returns the number of active sound sources | ||
| void | GetPhasesForFrequencies
(
USoundSubmix* InSubmix, |
||
| FAudioPlatformSettings | Allow platforms to optionally specify low-level audio platform settings. | ||
| bool | HasCompressedAudioInfoClass
(
USoundWave* SoundWave |
Whether this SoundWave has an associated info class to decompress it | |
| bool | Starts up any platform specific hardware/APIs | ||
| void | |||
| void | Initializes sound submixes. | ||
| bool | Check if any background music or sound is playing through the audio device | ||
| bool | Audio Device Properties. | ||
| void | OnListenerUpdated
(
const TArray< FListener >& InListeners |
This is overridden in Audio::FMixerDevice to propogate listener information to the audio thread. | |
| void | RegisterSoundSubmix
(
USoundSubmixBase* SoundSubmix, |
Registers the sound submix | |
| void | RegisterSubmixBufferListener
(
ISubmixBufferListener* InSubmixBufferListener, |
Submix buffer listener callbacks. | |
| void | RemoveSpectralAnalysisDelegate
(
USoundSubmix* InSubmix, |
||
| void | Resume any context related objects | ||
| void | SetSubmixAutoDisable
(
USoundSubmix* InSoundSubmix, |
Submix auto-disable setteings. | |
| void | SetSubmixAutoDisableTime
(
USoundSubmix* InSoundSubmix, |
Set what the auto-disable time is. | |
| void | SetSubmixDryLevel
(
USoundSubmix* InSoundSubmix, |
Set the wet-dry level of the given submix | |
| void | SetSubmixEffectChainOverride
(
USoundSubmix* InSoundSubmix, |
Submix effect chain override settings. | |
| void | SetSubmixModulationBaseLevels
(
USoundSubmix* InSoundSubmix, |
||
| void | SetSubmixOutputVolume
(
USoundSubmix* InSoundSubmix, |
Set the wet-dry level of the given submix | |
| void | SetSubmixWetDryLevel
(
USoundSubmix* InSoundSubmix, |
Set the wet-dry level of the given submix | |
| void | SetSubmixWetLevel
(
USoundSubmix* InSoundSubmix, |
Set the wet-dry level of the given submix | |
| void | StartEnvelopeFollowing
(
USoundSubmix* InSubmix |
Submix envelope following. | |
| void | StartRecording
(
USoundSubmix* InSubmix, |
Submix recording callbacks: | |
| void | StartSpectrumAnalysis
(
USoundSubmix* InSubmix, |
Submix Spectrum Analysis. | |
| void | StopEnvelopeFollowing
(
USoundSubmix* InSubmix |
This is called by a USoundSubmix when we stop envelope following a submix instance on this device. | |
| Audio::FAlignedFloatBuffer & | StopRecording
(
USoundSubmix* InSubmix, |
This is called by a USoundSubmix when we stop recording a submix on this device. | |
| void | StopSpectrumAnalysis
(
USoundSubmix* InSubmix |
||
| bool | Whether this device supports realtime decompression of sound waves (i.e. DTYPE_RealTime) | ||
| void | Suspend any context related objects | ||
| void | Shuts down any platform specific hardware/APIs | ||
| void | UnregisterSoundSubmix
(
const USoundSubmixBase* SoundSubmix |
Unregisters the sound submix | |
| void | UnregisterSubmixBufferListener
(
ISubmixBufferListener* InSubmixBufferListener, |
Unregisters the submix buffer listener with the given submix. | |
| void | Sets the update delta time for the audio frame | ||
| void | Update called on game thread. | ||
| void | Lets the platform any tick actions | ||
| void | Updates timing information for hardware. | ||
| void | UpdateSourceEffectChain
(
const uint32 SourceEffectChainId, |
Updates the source effect chain (using unique object id). | |
| void | UpdateSubmixModulationSettings
(
USoundSubmix* InSoundSubmix, |
Submix Modulation Settings. | |
| void | UpdateSubmixProperties
(
USoundSubmixBase* InSubmix |
Submix dry/wet settings. | |
| bool | ValidateAPICall
(
const TCHAR* Function, |
Check for errors and output a human readable string |
Overridden from IAudioMixer
| Type | Name | Description | |
|---|---|---|---|
| void | Called when audio render thread stream is shutting down. | ||
| bool | OnProcessAudioStream
(
FAlignedFloatBuffer& OutputBuffer |
Callback to generate a new audio stream buffer. |
Overridden from FGCObject
| Type | Name | Description | |
|---|---|---|---|
| void | AddReferencedObjects
(
FReferenceCollector& Collector |
Pure virtual that must be overloaded by the inheriting class. | |
| FString | Overload this method to report a name for your referencer |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
| FPatchOutputStrongPtr | AddPatchForAudioBus
(
uint32 InAudioBusId, |
AddPatchForAudioBus is deprecated. Use UAudioBusSubsystem::AddPatchOutputForAudioBus. | |
| FPatchOutputStrongPtr | AddPatchForAudioBus_GameThread
(
uint32 InAudioBusId, |
AddPatchForAudioBus_GameThread is deprecated. Use UAudioBusSubsystem::AddPatchOutputForAudioBus. | |
| void | AddPatchInputForAudioBus
(
const FPatchInput& InPatchInput, |
This overload of AddPatchInputForAudioBus is deprecated and non-functional. Use the overload that takes the number of frames and channels as parameters. | |
| void | AddPatchInputForAudioBus_GameThread
(
const FPatchInput& InPatchInput, |
AddPatchInputForAudioBus_GameThread is deprecated. Use UAudioBusSubsystem::AddPatchInputForAudioBus. | |
| ICompressedAudioInfo * | CreateCompressedAudioInfo
(
const FSoundWaveProxyPtr& SoundWave |
CreateCompressedAudioInfo is now deprecated. Please use IAudioInfoFactory::Create() instead | |
| ICompressedAudioInfo * | CreateCompressedAudioInfo
(
const USoundWave* SoundWave |
CreateCompressedAudioInfo is now deprecated. Please use IAudioInfoFactory::Create() instead | |
| FName | GetRuntimeFormat
(
const USoundWave* SoundWave |
GetRuntimeFormat is now deprecated. Please call SoundWave::GetRuntimeFormat() instead | |
| void | The functionality for this has been moved to UAudioBusSubsystem::InitDefaultAudioBuses, which is now automatically called on subsystem creation. | ||
| bool | IsAudioBusActive
(
uint32 InAudioBusId |
This function is deprecated. Use UAudioBusSubsystem::IsAudioBusActive instead. | |
| void | The functionality for this has been moved to UAudioBusSubsystem::ShutdownDefaultAudioBuses. | ||
| void | StartAudioBus
(
uint32 InAudioBusId, |
This function is deprecated. Use UAudioBusSubsystem::StartAudioBus instead. | |
| void | StopAudioBus
(
uint32 InAudioBusId |
This function is deprecated. Use UAudioBusSubsystem::StopAudioBus instead. |