IAudioEndpoint

Class that allows audio to be sent to an arbitrary locale.

Windows
MacOS
Linux

References

Module

AudioExtensions

Header

/Engine/Source/Runtime/AudioExtensions/Public/IAudioEndpoint.h

Include

#include "IAudioEndpoint.h"

Syntax

class IAudioEndpoint

Remarks

Class that allows audio to be sent to an arbitrary locale. This can be used for multi-device rendering, haptics systems, etc.

that this only for interleaved audio buffers with no metadata for object-based or soundfield-based rendering. For those, see

Destructors

Name Description

Public function Virtual

~IAudioEndpoint()

Functions

Name Description

Protected function

void

 

DisconnectAllInputs()

Thread safe function to disconnect everything from this endpoint.

Protected function Virtual Const

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.

Protected function Virtual Const

int32

 

GetDesiredNumFrames()

Protected function Const

int32

 

GetNumChannels()

This should return the number of channels we should be sending to this endpoint.

Protected function Const

float

 

GetSampleRate()

REQUIRED OVERRIDES: This should return the sample rate we should be sending to this endpoint.

Protected function Virtual

bool

 

OnAudioCallback

(
    const TArrayView< const float >& I...,
    const int32& NumChannels,
    const IAudioEndpointSettingsProxy&...
)

For endpoints that override EndpointRequiresCallback to return true, this callback will be called every (GetDesiredNumFrames() / GetSampleRate()) seconds.

Public function

Audio::FPatc...

 

PatchNewInput

(
    float ExpectedDurationPerRender,
    float& OutSampleRate,
    int32& OutNumChannels
)

Create a new patch point for this endpoint.

Protected function

void

 

PollSettings

(
    TFunctionRef< void...
)

Use this as a thread safe way to use the current settings posted to this IAudioEndpoint.

Protected function

int32

 

PopAudio

(
    float* OutAudio,
    int32 NumSamples
)

METHODS USED BY IMPLEMENTATIONS OF IAudioEndpoint: This is used by the IAudioEndpoint implementation to poll buffered audio to process or send to the endpoint.

Public function

void

 

ProcessAudioIfNeccessary()

If this audio endpoint hasn't spawned a seperate callback thread but requires a callback, this should be executed somewhere.

Protected function

void

 

RunCallbackSynchronously()

If EndpointRequiresCallback() returns true, this can be used to manually run the callback.

Public function

void

 

SetNewSettings

Post new settings for this endpoint.

Protected function

void

 

StartRunningAsyncCallback()

If EndpointRequiresCallback() returns true, this can be used to spawn an async thread and begin calling OnAudioCallback.

Protected function

void

 

StopRunningAsyncCallback()

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss