Navigation
API > API/Plugins > API/Plugins/MetasoundEngine > API/Plugins/MetasoundEngine/UMetaSoundSource
Description
Resolves SourceFormatName and NumChannels based on the current OutputFormat. For ChannelAgnostic sources, determines format via Custom > Auto priority and populates the Environment. For discrete sources, derives NumChannels from GetOutputAudioChannelOrder().
Does NOT modify USoundWave::NumChannels the caller is responsible for assigning the returned value where appropriate.
| Name | ResolveSourceFormatAndNumChannels |
| Type | function |
| Header File | /Engine/Plugins/Runtime/Metasound/Source/MetasoundEngine/Public/MetasoundSource.h |
| Include Path | #include "MetasoundSource.h" |
| Source | /Engine/Plugins/Runtime/Metasound/Source/MetasoundEngine/Private/MetasoundSource.cpp |
FResolvedSourceFormat ResolveSourceFormatAndNumChannels
(
const FSoundGeneratorInitParams & InParams,
const TArray < FAudioParameter > & InDefaultParameters,
Metasound::FMetasoundEnvironment & InOutEnvironment
)
FResolvedSourceFormat containing the format name and channel count.
Parameters
| Name | Remarks |
|---|---|
| InParams | Sound generator init params (used for fallback channel count). |
| InDefaultParameters | Audio parameters for auto-format detection (pass empty for precache). |
| InOutEnvironment | Environment to populate with SourceFormatName. |