Navigation
API > API/Plugins > API/Plugins/MetasoundGraphCore
Audio settings for Metasound IOperators including audio sample rate, block rate and frames per block.
The audio SampleRate defines the number of audio samples per a second of a mono waveform.
The BlockRate defines the number of times an IOperator's execution function will be triggered per a second of audio content.
The NumFramesPerBlock defines the number of audio frames written-to and/or read-from during a single call to an IOperator's execution function.
GetNumFramesPerBlock() is required to return a value that abides by the alignment requirements of FAudioBuffer, FAlignedFloatBuffer and the math routines declared in BufferVectorOperations.h. This enables the vast majority of Metasound IOperators to take advantage of SIMD hardware accelerations.
In order to achieve SIMD alignment, desired block rates must be slightly adjusted to match the boundaries of the given sample rate and SIMD alignment. GetActualBlockRate() returns the true block rate after adhering to sample rate and SIMD boundaries.
| Name | FOperatorSettings |
| Type | class |
| Header File | /Engine/Plugins/Runtime/Metasound/Source/MetasoundGraphCore/Public/MetasoundOperatorSettings.h |
| Include Path | #include "MetasoundOperatorSettings.h" |
Syntax
class FOperatorSettings
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FOperatorSettings
(
FSampleRate InSampleRate, |
FOperatorSettings constructor. | MetasoundOperatorSettings.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ActualBlockRate | float | MetasoundOperatorSettings.h | ||
| NumFramesPerBlock | int32 | MetasoundOperatorSettings.h | ||
| SampleRate | FSampleRate | MetasoundOperatorSettings.h | ||
| TargetBlockRate | float | MetasoundOperatorSettings.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
float GetActualBlockRate() |
Get the actual block rate in Hz after adhering to sample rate and SIMD alignment. | MetasoundOperatorSettings.h | |
int32 GetNumFramesPerBlock () |
Get the number of audio frames in a block. | MetasoundOperatorSettings.h | |
float GetSampleRate() |
Get the audio sample rate in Hz. | MetasoundOperatorSettings.h | |
float GetTargetBlockRate() |
Get the target block rate in Hz. | MetasoundOperatorSettings.h | |
void SetSampleRate
(
FSampleRate InSampleRate |
Set the audio sample rate in Hz. | MetasoundOperatorSettings.h | |
void SetTargetBlockRate
(
float InTargetBlockRate |
Set the target block rate in Hz. | MetasoundOperatorSettings.h | |
FString ToString() |
Convert to human readable string. | MetasoundOperatorSettings.h |