UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ISoundfieldEndpoint Class Reference

#include <ISoundfieldEndpoint.h>

Public Member Functions

AUDIOEXTENSIONS_API ISoundfieldEndpoint (int32 NumRenderCallbacksToBuffer)
 
virtual ~ISoundfieldEndpoint ()
 
AUDIOEXTENSIONS_API bool PushAudio (TUniquePtr< ISoundfieldAudioPacket > &&InPacket)
 
AUDIOEXTENSIONS_API void SetNewSettings (TUniquePtr< ISoundfieldEndpointSettingsProxy > &&InNewSettings)
 
AUDIOEXTENSIONS_API int32 GetNumPacketsBuffer ()
 
AUDIOEXTENSIONS_API int32 GetRemainderInPacketBuffer ()
 
AUDIOEXTENSIONS_API void ProcessAudioIfNecessary ()
 

Protected Member Functions

virtual bool EndpointRequiresCallback () const
 
virtual float GetDesiredCallbackPeriodicity () const
 
virtual void OnAudioCallback (TUniquePtr< ISoundfieldAudioPacket > &&InPacket, const ISoundfieldEndpointSettingsProxy *InSettings)
 
AUDIOEXTENSIONS_API TUniquePtr< ISoundfieldAudioPacketPopAudio ()
 
AUDIOEXTENSIONS_API void PollSettings (TFunctionRef< void(const ISoundfieldEndpointSettingsProxy *)> SettingsCallback)
 
AUDIOEXTENSIONS_API void StartRunningCallback ()
 
AUDIOEXTENSIONS_API void StopRunningCallback ()
 
AUDIOEXTENSIONS_API void RunCallbackSynchronously ()
 

Detailed Description

Class that allows soundfield-encoded audio to be sent to an arbitrary locale. For endpoint types that support receiving our downmixed interleaved audio data directly, implement IAudioEndpoint instead.

Constructor & Destructor Documentation

◆ ISoundfieldEndpoint()

ISoundfieldEndpoint::ISoundfieldEndpoint ( int32  NumRenderCallbacksToBuffer)
Parameters
[NumRenderCallbacksToBuffer]Maximum number of ISoundfieldPackets that should be buffered.

◆ ~ISoundfieldEndpoint()

virtual ISoundfieldEndpoint::~ISoundfieldEndpoint ( )
inlinevirtual

Member Function Documentation

◆ EndpointRequiresCallback()

virtual bool ISoundfieldEndpoint::EndpointRequiresCallback ( ) const
inlineprotectedvirtual

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 GetDesiredCallbackFrequency should be overridden.

◆ GetDesiredCallbackPeriodicity()

virtual float ISoundfieldEndpoint::GetDesiredCallbackPeriodicity ( ) const
inlineprotectedvirtual

For endpoints that return true for EndpointRequiresCallback, this should return the duration between OnAudioCallback calls in seconds.

◆ GetNumPacketsBuffer()

int32 ISoundfieldEndpoint::GetNumPacketsBuffer ( )

◆ GetRemainderInPacketBuffer()

int32 ISoundfieldEndpoint::GetRemainderInPacketBuffer ( )

◆ OnAudioCallback()

virtual void ISoundfieldEndpoint::OnAudioCallback ( TUniquePtr< ISoundfieldAudioPacket > &&  InPacket,
const ISoundfieldEndpointSettingsProxy InSettings 
)
inlineprotectedvirtual

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

Parameters
[in]InPacketthe next buffer of audio. Can be nullptr if PushAudio hasn't been called in a while and the buffer is starved.
[in]InSettingsis the most recent soundfield settings for this endpoint. Can be null.

◆ PollSettings()

void ISoundfieldEndpoint::PollSettings ( TFunctionRef< void(const ISoundfieldEndpointSettingsProxy *)>  SettingsCallback)
protected

Use this as a thread safe way to use the current settings posted to this IAudioEndpoint. Locks with IAudioEndpoint::SetSettings.

Parameters
[in]NewSettingsRetrievedlambda used to work with the retrieved settings. This lambda is called immediately and synchronously, but is used to safely scope usage of the IAudioEndpointSettingsProxy pointer. Note that the resulting ISoundfieldEndpointSettingsProxy can be null.

◆ PopAudio()

TUniquePtr< ISoundfieldAudioPacket > ISoundfieldEndpoint::PopAudio ( )
protected

METHODS USED BY IMPLEMENTATIONS OF ISoundfieldEndpoint: This is used by the IAudioEndpoint implementation to poll buffered audio to process or send to the endpoint. Note that this is NOT thread safe if EndpointRequiresCallback() is overridden to return true. If that is the case, use an override of OnAudioCallback instead.

◆ ProcessAudioIfNecessary()

void ISoundfieldEndpoint::ProcessAudioIfNecessary ( )

If this endpoint hasn't created it's own async callback thread but still requires an explicit callback, this should be called.

◆ PushAudio()

bool ISoundfieldEndpoint::PushAudio ( TUniquePtr< ISoundfieldAudioPacket > &&  InPacket)

Push a soundfield packet to the buffer.

◆ RunCallbackSynchronously()

void ISoundfieldEndpoint::RunCallbackSynchronously ( )
protected

◆ SetNewSettings()

void ISoundfieldEndpoint::SetNewSettings ( TUniquePtr< ISoundfieldEndpointSettingsProxy > &&  InNewSettings)

Post new settings for this endpoint. There is no type safety on this call, so make sure that you are using the correct implementation of IAudioEndpointSettingsProxy for this implementation of IAudioEndpoint.

◆ StartRunningCallback()

void ISoundfieldEndpoint::StartRunningCallback ( )
protected

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

◆ StopRunningCallback()

void ISoundfieldEndpoint::StopRunningCallback ( )
protected

The documentation for this class was generated from the following files: