![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <AudioMixer.h>
Inheritance diagram for Audio::IAudioMixerPlatformInterface:Static Public Member Functions | |
| static AUDIOMIXERCORE_API bool | GetChannelTypeAtIndex (const int32 Index, EAudioMixerChannel::Type &OutType) |
Protected Member Functions | |
| AUDIOMIXERCORE_API uint32 | MainAudioDeviceRun () |
| virtual AUDIOMIXERCORE_API uint32 | RunInternal () |
| void | AudioMixerPlatformLogOnce (const FString &LogDetails, const FString &FileName, int32 LineNumber, ELogVerbosity::Type InVerbosity=ELogVerbosity::Error) |
| AUDIOMIXERCORE_API void | BeginGeneratingAudio () |
| AUDIOMIXERCORE_API void | StopGeneratingAudio () |
| AUDIOMIXERCORE_API void | ApplyMasterAttenuation (TArrayView< const uint8 > &InOutPoppedAudio) |
| AUDIOMIXERCORE_API void | ApplyPrimaryAttenuation (TArrayView< const uint8 > &InOutPoppedAudio) |
| template<typename BufferType > | |
| void | ApplyAttenuationInternal (TArrayView< BufferType > &InOutBuffer) |
| AUDIOMIXERCORE_API void | StartRunningNullDevice () |
| AUDIOMIXERCORE_API void | StopRunningNullDevice () |
| AUDIOMIXERCORE_API void | CreateNullDeviceThread (const TFunction< void()> InCallback, float InBufferDuration, bool bShouldPauseOnStart) |
Static Protected Attributes | |
| static AUDIOMIXERCORE_API FThreadSafeCounter | NextInstanceID |
Additional Inherited Members | |
Public Types inherited from Audio::IAudioMixerDeviceChangedListener | |
| enum class | EDisconnectReason { DeviceRemoval , ServerShutdown , FormatChanged , SessionLogoff , SessionDisconnected , ExclusiveModeOverride } |
Abstract interface for mixer platform.
|
virtual |
Virtual destructor.
| Audio::IAudioMixerPlatformInterface::IAudioMixerPlatformInterface | ( | ) |
Constructor.
|
protected |
|
protected |
|
protected |
Performs buffer fades for shutdown/startup of audio mixer.
|
inlineprotected |
Is called when an error, warning or log is generated.
|
protected |
Start generating audio from our mixer.
Check if audio device changed if applicable. Return true if audio device changed.
Reimplemented in Audio::FMixerPlatformAudioUnit, Audio::FMixerPlatformCoreAudio, Audio::FAudioMixerPlatformSwappable, Audio::FMixerPlatformNonRealtime, and Audio::FMixerPlatformXAudio2.
Closes the audio stream (if it's open).
Implemented in Audio::FMixerPlatformAndroid, Audio::FMixerPlatformAudioUnit, Audio::FMixerPlatformCoreAudio, Audio::FAudioMixerPlatformAudioLink, Audio::FMixerPlatformSDL, Audio::FMixerPlatformNonRealtime, Audio::FAudioMixerWasapi, and Audio::FMixerPlatformXAudio2.
|
protected |
Called by platform specific logic to pre-create or create the null renderer thread
Whether or not the platform disables caching of decompressed PCM data (i.e. to save memory on fixed memory platforms)
|
virtual |
Reset the fade state (use if reusing audio platform interface, e.g. in main audio device.
Reimplemented in Audio::FMixerPlatformNonRealtime.
|
virtual |
Start a fadeout. Prevents pops during shutdown.
Reimplemented in Audio::FMixerPlatformNonRealtime.
|
static |
|
inlinevirtual |
Returns the name of the currently used audio device.
Reimplemented in Audio::FMixerPlatformXAudio2.
|
pure virtual |
Return any optional device name defined in platform configuratio.
Implemented in Audio::FMixerPlatformAndroid, Audio::FMixerPlatformAudioUnit, Audio::FMixerPlatformCoreAudio, Audio::FAudioMixerPlatformAudioLink, Audio::FMixerPlatformSDL, Audio::FMixerPlatformNonRealtime, Audio::FAudioMixerWasapi, and Audio::FMixerPlatformXAudio2.
|
inlinevirtual |
Returns the default device index.
Reimplemented in Audio::FMixerPlatformAndroid, Audio::FMixerPlatformAudioUnit, Audio::FMixerPlatformCoreAudio, Audio::FAudioMixerPlatformAudioLink, Audio::FMixerPlatformSDL, Audio::FMixerPlatformNonRealtime, Audio::FAudioMixerWasapi, and Audio::FMixerPlatformXAudio2.
|
inlinevirtual |
Reimplemented in Audio::FAudioMixerWasapi, and Audio::FMixerPlatformXAudio2.
|
virtual |
Can be used to look up the current index for a given device name. On most platforms, this index may be invalidated if any devices are added or removed. Returns INDEX_NONE if no mapping is found
|
inline |
Used to determine if this object is listening to system device change events.
|
inline |
Returns the last error generated.
|
inlinevirtual |
Allows platforms to filter the requested number of frames to render. Some platforms only support specific frame counts.
Reimplemented in Audio::FMixerPlatformAudioUnit, Audio::FMixerPlatformCoreAudio, and Audio::FAudioMixerWasapi.
|
inlinevirtual |
Returns the number of output devices.
Reimplemented in Audio::FMixerPlatformAndroid, Audio::FMixerPlatformAudioUnit, Audio::FMixerPlatformCoreAudio, Audio::FAudioMixerPlatformAudioLink, Audio::FMixerPlatformSDL, Audio::FMixerPlatformNonRealtime, Audio::FAudioMixerWasapi, and Audio::FMixerPlatformXAudio2.
|
pure virtual |
Gets the device information of the given device index.
Implemented in Audio::FMixerPlatformAndroid, Audio::FMixerPlatformAudioUnit, Audio::FMixerPlatformCoreAudio, Audio::FAudioMixerPlatformAudioLink, Audio::FMixerPlatformSDL, Audio::FMixerPlatformNonRealtime, Audio::FAudioMixerWasapi, and Audio::FMixerPlatformXAudio2.
|
pure virtual |
Returns the platform API name.
Implemented in Audio::FMixerPlatformAndroid, Audio::FMixerPlatformAudioUnit, Audio::FMixerPlatformCoreAudio, Audio::FAudioMixerPlatformAudioLink, Audio::FMixerPlatformSDL, Audio::FMixerPlatformNonRealtime, Audio::FAudioMixerWasapi, and Audio::FMixerPlatformXAudio2.
|
pure virtual |
Returns the platform device info of the currently open audio stream.
Implemented in Audio::FMixerPlatformAndroid, Audio::FMixerPlatformAudioUnit, Audio::FMixerPlatformCoreAudio, Audio::FAudioMixerPlatformAudioLink, Audio::FMixerPlatformSDL, Audio::FMixerPlatformNonRealtime, Audio::FAudioMixerWasapi, and Audio::FMixerPlatformXAudio2.
|
pure virtual |
Gets the platform specific audio settings.
Implemented in Audio::FMixerPlatformAndroid, Audio::FMixerPlatformAudioUnit, Audio::FMixerPlatformCoreAudio, Audio::FAudioMixerPlatformAudioLink, Audio::FMixerPlatformSDL, Audio::FMixerPlatformNonRealtime, Audio::FAudioMixerWasapi, and Audio::FMixerPlatformXAudio2.
|
inlineoverridevirtual |
FSingleThreadRunnable accessor for ticking this FRunnable when multi-threading is disabled.
Reimplemented from FRunnable.
Initialize the hardware.
Implemented in Audio::FMixerPlatformAndroid, Audio::FMixerPlatformAudioUnit, Audio::FMixerPlatformCoreAudio, Audio::FAudioMixerPlatformAudioLink, Audio::FMixerPlatformSDL, Audio::FMixerPlatformNonRealtime, Audio::FAudioMixerWasapi, and Audio::FMixerPlatformXAudio2.
|
inlinevirtual |
Reimplemented in Audio::FAudioMixerWasapi, and Audio::FMixerPlatformXAudio2.
Is the hardware initialized.
Implemented in Audio::FMixerPlatformAndroid, Audio::FMixerPlatformAudioUnit, Audio::FMixerPlatformCoreAudio, Audio::FAudioMixerPlatformAudioLink, Audio::FMixerPlatformSDL, Audio::FMixerPlatformNonRealtime, Audio::FAudioMixerWasapi, and Audio::FMixerPlatformXAudio2.
Whether this is an interface for a non-realtime renderer. If true, synch events will behave differently to avoid deadlocks.
Reimplemented in Audio::FMixerPlatformNonRealtime.
|
protected |
Reimplemented in Audio::FAudioMixerPlatformSwappable, and Audio::FMixerPlatformXAudio2.
|
inlinevirtual |
Resets the audio stream to use a new audio device with the given device ID (empty string means default).
Reimplemented in Audio::FMixerPlatformAudioUnit, Audio::FMixerPlatformCoreAudio, and Audio::FMixerPlatformNonRealtime.
Reimplemented in Audio::FMixerPlatformNonRealtime, and Audio::FMixerPlatformXAudio2.
|
pure virtual |
Opens up a new audio stream with the given parameters.
Implemented in Audio::FMixerPlatformAndroid, Audio::FMixerPlatformAudioUnit, Audio::FMixerPlatformCoreAudio, Audio::FAudioMixerPlatformAudioLink, Audio::FMixerPlatformSDL, Audio::FMixerPlatformNonRealtime, Audio::FAudioMixerWasapi, and Audio::FMixerPlatformXAudio2.
| void Audio::IAudioMixerPlatformInterface::PostInitializeHardware | ( | ) |
This is called after InitializeHardware() is called.
| void Audio::IAudioMixerPlatformInterface::ReadNextBuffer | ( | ) |
Retrieves the next generated buffer and feeds it to the platform mixer output stream.
UE_BUILD_SHIPPING
|
inlinevirtual |
Sends a command to swap which output device is being used
Reimplemented in Audio::FAudioMixerPlatformSwappable.
Reimplemented in Audio::FMixerPlatformAndroid, Audio::FMixerPlatformAudioUnit, Audio::FMixerPlatformCoreAudio, and Audio::FMixerPlatformSDL.
Resumes playback on new audio device after device change.
Reimplemented in Audio::FAudioMixerPlatformSwappable, and Audio::FMixerPlatformNonRealtime.
|
overridevirtual |
|
protectedvirtual |
Reimplemented in Audio::FMixerPlatformNonRealtime.
|
inline |
Reimplemented in Audio::FAudioMixerWasapi, and Audio::FMixerPlatformXAudio2.
Starts the audio stream processing and generating audio.
Implemented in Audio::FMixerPlatformAndroid, Audio::FMixerPlatformAudioUnit, Audio::FMixerPlatformCoreAudio, Audio::FAudioMixerPlatformAudioLink, Audio::FMixerPlatformSDL, Audio::FMixerPlatformNonRealtime, Audio::FAudioMixerWasapi, and Audio::FMixerPlatformXAudio2.
|
protected |
When called, spins up a thread to start consuming output when no audio device is available.
Stops the audio stream (but keeps the audio stream open).
Implemented in Audio::FMixerPlatformAndroid, Audio::FMixerPlatformAudioUnit, Audio::FMixerPlatformCoreAudio, Audio::FAudioMixerPlatformAudioLink, Audio::FMixerPlatformSDL, Audio::FMixerPlatformNonRealtime, Audio::FAudioMixerWasapi, and Audio::FMixerPlatformXAudio2.
|
protected |
Stops the render thread from generating audio.
|
protected |
When called, terminates the null device.
|
inlinevirtual |
Submit the given buffer to the platform's output audio device.
Reimplemented in Audio::FMixerPlatformAndroid, Audio::FMixerPlatformAudioUnit, Audio::FMixerPlatformCoreAudio, Audio::FMixerPlatformSDL, Audio::FMixerPlatformNonRealtime, Audio::FAudioMixerWasapi, and Audio::FMixerPlatformXAudio2.
|
inlinevirtual |
Submit a buffer that is to be output directly through a discreet device channel.
Reimplemented in Audio::FAudioMixerWasapi.
|
inlinevirtual |
Whether or not this platform has hardware decompression.
Reimplemented in Audio::FMixerPlatformAndroid, Audio::FMixerPlatformAudioUnit, Audio::FMixerPlatformCoreAudio, and Audio::FMixerPlatformSDL.
|
overridevirtual |
Implements FSingleThreadRunnable.
|
protected |
Event allows you to block until fadeout is complete.
|
protected |
The render thread sync event.
|
protected |
The audio render thread.
|
protected |
The audio device stream info.
|
protected |
|
protected |
|
protected |
|
protected |
This is used if we are attempting to TryLock on DeviceSwapCriticalSection, but a buffer callback is being called in the current thread.
|
protected |
|
protected |
|
protected |
|
protected |
Whether or not we warned of buffer underrun.
|
protected |
|
protected |
|
protected |
This device name can be used to override the default device being used on platforms that use strings to identify audio devices.
|
protected |
Critical Section used for times when we need the render loop to halt for the device swap.
|
protected |
Source param used to fade in and out audio device.
|
protected |
The fade value. Used for fading in/out primary audio.
|
protected |
A Unique ID Identifying this instance. Mostly used for logging.
|
protected |
String containing the last generated error.
|
staticprotected |
A Counter to provide the next unique id.
|
protected |
The number of mixer buffers to queue on the output source voice.
|
protected |
|
protected |
List of generated output buffers.