Navigation
API > API/Runtime > API/Runtime/AudioExtensions
Class that allows audio to be sent to an arbitrary locale. This can be used for multi-device rendering, haptics systems, etc. Note that this only for interleaved audio buffers with no metadata for object-based or soundfield-based rendering. For those, see
| Name | IAudioEndpoint |
| Type | class |
| Header File | /Engine/Source/Runtime/AudioExtensions/Public/IAudioEndpoint.h |
| Include Path | #include "IAudioEndpoint.h" |
Syntax
class IAudioEndpoint
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~IAudioEndpoint() |
IAudioEndpoint.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| BufferForRenderCallback | Audio::FAlignedFloatBuffer | If we have a render callback, we pop audio from the PatchMixer to this buffer before calling OnAudioCallback. | IAudioEndpoint.h | |
| CurrentSettings | TUniquePtr< IAudioEndpointSettingsProxy > | Owns the current settings for this endpoint. | IAudioEndpoint.h | |
| CurrentSettingsCriticalSection | FCriticalSection | IAudioEndpoint.h | ||
| PatchMixer | Audio::FPatchMixer | Object used to mix all inputs together. Polled when OnAudioCallback is executed or when PollAudio is called. | IAudioEndpoint.h | |
| RenderCallback | TUniquePtr< Audio::FMixerNullCallback > | Owns a scoped thread and runs OnAudioCallback when StartRunningCallback() is called. | IAudioEndpoint.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool IsImplemented() |
Whether this endpoint is of an implemented type | IAudioEndpoint.h | |
Audio::FPatchInput PatchNewInput
(
float ExpectedDurationPerRender, |
Create a new patch point for this endpoint. | IAudioEndpoint.h | |
void ProcessAudioIfNeccessary() |
If this audio endpoint hasn't spawned a seperate callback thread but requires a callback, this should be executed somewhere. | IAudioEndpoint.h | |
void SetNewSettings
(
TUniquePtr< IAudioEndpointSettingsProxy >&& InNewSettings |
Post new settings for this endpoint. | IAudioEndpoint.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void DisconnectAllInputs () |
Thread safe function to disconnect everything from this endpoint. | IAudioEndpoint.h | |
virtual bool EndpointRequiresCallback() |
OPTIONAL OVERRIDES: For endpoints that do not explicitly fire a timed callback to poll audio data, this should be overridden to return true, and OnAudioCallback and GetDesiredNumFrames should be overridden. | IAudioEndpoint.h | |
virtual int32 GetDesiredNumFrames() |
IAudioEndpoint.h | ||
virtual int32 GetNumChannels () |
This should return the number of channels we should be sending to this endpoint. | IAudioEndpoint.h | |
virtual float GetSampleRate () |
REQUIRED OVERRIDES: This should return the sample rate we should be sending to this endpoint. | IAudioEndpoint.h | |
virtual bool OnAudioCallback
(
const TArrayView< const float >& InAudio, |
For endpoints that override EndpointRequiresCallback to return true, this callback will be called every (GetDesiredNumFrames() / GetSampleRate()) seconds. | IAudioEndpoint.h | |
void PollSettings
(
TFunctionRef< void(const IAudioEndpointSettingsProxy*)> NewSettingsRetrieved |
Use this as a thread safe way to use the current settings posted to this IAudioEndpoint. | IAudioEndpoint.h | |
int32 PopAudio
(
float* OutAudio, |
METHODS USED BY IMPLEMENTATIONS OF IAudioEndpoint: This is used by the IAudioEndpoint implementation to poll buffered audio to process or send to the endpoint. | IAudioEndpoint.h | |
void RunCallbackSynchronously() |
If EndpointRequiresCallback() returns true, this can be used to manually run the callback. | IAudioEndpoint.h | |
void StartRunningAsyncCallback() |
If EndpointRequiresCallback() returns true, this can be used to spawn an async thread and begin calling OnAudioCallback. | IAudioEndpoint.h | |
void StopRunningAsyncCallback() |
IAudioEndpoint.h |