Navigation
API > API/Runtime > API/Runtime/AudioMixerCore
Audio mixer platform objects can subclass this in order to add device swap capabilities.
| Name | FAudioMixerPlatformSwappable |
| Type | class |
| Header File | /Engine/Source/Runtime/AudioMixerCore/Public/AudioMixer.h |
| Include Path | #include "AudioMixer.h" |
Syntax
class FAudioMixerPlatformSwappable : public Audio::IAudioMixerPlatformInterface
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FAudioMixerPlatformSwappable() |
AudioMixer.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FAudioMixerPlatformSwappable() |
AudioMixer.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ActiveDeviceSwap | TFuture< TUniquePtr< FDeviceSwapResult > > | Future which holds result of device swap upon completion. | AudioMixer.h | |
| LastDeviceSwapTime | double | Used to rate limit device swap attempts to ignore multiple requests | AudioMixer.h | |
| OriginalAudioDeviceId | FString | Used in OnDeviceAdded for determining if an added device is the same as the original device. | AudioMixer.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool AllowDeviceSwap
(
const bool bInForceSwap |
Called to determine if the current device swap request should be allowed to proceed. | AudioMixer.h | |
virtual bool CheckThreadedDeviceSwap() |
Called repeatedly to update an active, async device swap | AudioMixer.h | |
void EnqueueAsyncDeviceSwap() |
Kicks of an async device swap task | AudioMixer.h | |
bool InitializeDeviceSwapContext
(
const FString& InRequestedDeviceID, |
Initializes a new device swap context with the given parameters | AudioMixer.h | |
virtual bool PostDeviceSwap() |
Called after a device swap completes, providing an opportunity for any needed cleanup | AudioMixer.h | |
virtual bool PreDeviceSwap() |
Called at the beginning of a device swap to perform any needed initialization | AudioMixer.h | |
void SynchronousDeviceSwap() |
Performs a device swap synchronously in the current thread | AudioMixer.h |
Overridden from IAudioMixerPlatformInterface
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool CheckAudioDeviceChange() |
Check if audio device changed if applicable. Return true if audio device changed. | AudioMixer.h | |
virtual bool MoveAudioStreamToNewAudioDevice() |
AudioMixer.h | ||
virtual bool RequestDeviceSwap
(
const FString& DeviceID, |
Sends a command to swap which output device is being used | AudioMixer.h | |
virtual void ResumePlaybackOnNewDevice() |
Resumes playback on new audio device after device change. | AudioMixer.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
const FDeviceSwapResult * GetDeviceSwapResult () |
The results produced from a device swap operation. | AudioMixer.h | |
| AudioMixer.h | |||
FString GetOriginalAudioDeviceId() |
Used in OnDeviceAdded for determining if an added device is the same as the original device. | AudioMixer.h | |
void ResetActiveDeviceSwapFuture() |
AudioMixer.h | ||
void SetActiveDeviceSwapFuture
(
TFuture< TUniquePtr< FDeviceSwapResult > >&& InFuture |
Future which holds result of device swap upon completion. | AudioMixer.h | |
void SetOriginalAudioDeviceId
(
const FString& InAudioDeviceId |
AudioMixer.h |