Navigation
API > API/Runtime > API/Runtime/AudioExtensions
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.
| Name | ISoundfieldEndpoint |
| Type | class |
| Header File | /Engine/Source/Runtime/AudioExtensions/Public/ISoundfieldEndpoint.h |
| Include Path | #include "ISoundfieldEndpoint.h" |
Syntax
class ISoundfieldEndpoint
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ISoundfieldEndpoint
(
int32 NumRenderCallbacksToBuffer |
ISoundfieldEndpoint.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~ISoundfieldEndpoint() |
ISoundfieldEndpoint.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AudioPacketBuffer | TArray< TUniquePtr< ISoundfieldAudioPacket > > | This array is used as a non-copying circular buffer for ISoundfieldAudioPackets. | ISoundfieldEndpoint.h | |
| CurrentSettings | TUniquePtr< ISoundfieldEndpointSettingsProxy > | Owns the current settings for this endpoint. | ISoundfieldEndpoint.h | |
| CurrentSettingsCriticalSection | FCriticalSection | ISoundfieldEndpoint.h | ||
| ReadCounter | FThreadSafeCounter | ISoundfieldEndpoint.h | ||
| RenderCallback | TUniquePtr< Audio::FMixerNullCallback > | Owns a scoped thread and runs OnAudioCallback when StartRunningCallback() is called. | ISoundfieldEndpoint.h | |
| WriteCounter | FThreadSafeCounter | ISoundfieldEndpoint.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
int32 GetNumPacketsBuffer() |
Returns the amount of ISoundfieldAudioPackets currently buffered for this endpoint. | ISoundfieldEndpoint.h | |
int32 GetRemainderInPacketBuffer() |
Returns the amount of ISoundfieldAudioPackets that can be buffered for this endpoint before reaching capacity. | ISoundfieldEndpoint.h | |
void ProcessAudioIfNecessary() |
If this endpoint hasn't created it's own async callback thread but still requires an explicit callback, this should be called. | ISoundfieldEndpoint.h | |
bool PushAudio
(
TUniquePtr< ISoundfieldAudioPacket >&& InPacket |
Push a soundfield packet to the buffer. | ISoundfieldEndpoint.h | |
void SetNewSettings
(
TUniquePtr< ISoundfieldEndpointSettingsProxy >&& InNewSettings |
Post new settings for this endpoint. | ISoundfieldEndpoint.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
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 GetDesiredCallbackFrequency should be overridden. | ISoundfieldEndpoint.h | |
virtual float GetDesiredCallbackPeriodicity() |
For endpoints that return true for EndpointRequiresCallback, this should return the duration between OnAudioCallback calls in seconds. | ISoundfieldEndpoint.h | |
virtual void OnAudioCallback
(
TUniquePtr< ISoundfieldAudioPacket >&& InPacket, |
For endpoints that override EndpointRequiresCallback to return true, this callback will be called every (GetDesiredNumFrames() / GetSampleRate()) seconds. | ISoundfieldEndpoint.h | |
void PollSettings
(
TFunctionRef< void(const ISoundfieldEndpointSettingsProxy*)> SettingsCallback |
Use this as a thread safe way to use the current settings posted to this IAudioEndpoint. | ISoundfieldEndpoint.h | |
| METHODS USED BY IMPLEMENTATIONS OF ISoundfieldEndpoint: This is used by the IAudioEndpoint implementation to poll buffered audio to process or send to the endpoint. | ISoundfieldEndpoint.h | ||
void RunCallbackSynchronously() |
ISoundfieldEndpoint.h | ||
void StartRunningCallback() |
If EndpointRequiresCallback() returns true, this will be used to spawn an async thread and begin calling OnAudioCallback. | ISoundfieldEndpoint.h | |
void StopRunningCallback() |
ISoundfieldEndpoint.h |