engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Protected 成员函数 | 所有成员列表
ISoundfieldEndpoint类 参考

Class that allows soundfield-encoded audio to be sent to an arbitrary locale. 更多...

#include <ISoundfieldEndpoint.h>

Public 成员函数

 ISoundfieldEndpoint (int32 NumRenderCallbacksToBuffer)
 
void ProcessAudioIfNecessary ()
 If this endpoint hasn't created it's own async callback thread but still requires an explicit callback, this should be called.
 
bool PushAudio (TUniquePtr< ISoundfieldAudioPacket > &&InPacket)
 Push a soundfield packet to the buffer.
 
void SetNewSettings (TUniquePtr< ISoundfieldEndpointSettingsProxy > &&InNewSettings)
 Post new settings for this endpoint. 更多...
 

Protected 成员函数

virtual bool EndpointRequiresCallback () const
 OPTIONAL OVERRIDES: 更多...
 
virtual float GetDesiredCallbackPeriodicity () const
 For endpoints that return true for EndpointRequiresCallback, this should return the duration between OnAudioCallback calls in seconds.
 
virtual void OnAudioCallback (TUniquePtr< ISoundfieldAudioPacket > &&InPacket, const ISoundfieldEndpointSettingsProxy *InSettings)
 For endpoints that override EndpointRequiresCallback to return true, this callback will be called every (GetDesiredNumFrames() / GetSampleRate()) seconds. 更多...
 
void PollSettings (TFunctionRef< void(const ISoundfieldEndpointSettingsProxy *)> SettingsCallback)
 Use this as a thread safe way to use the current settings posted to this IAudioEndpoint. 更多...
 
TUniquePtr< ISoundfieldAudioPacket > PopAudio ()
 METHODS USED BY IMPLEMENTATIONS OF ISoundfieldEndpoint: 更多...
 
void StartRunningCallback ()
 If EndpointRequiresCallback() returns true, this will be used to spawn an async thread and begin calling OnAudioCallback.
 

详细描述

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.

构造及析构函数说明

◆ ISoundfieldEndpoint()

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

成员函数说明

◆ 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.

◆ 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.

参数
[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.

参数
[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.

◆ 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.


该类的文档由以下文件生成: