class
MetaSoundVoice
A live instance of a MetaSound DSP graph, wired into the AudioEngine as a custom data source so its synthesized blocks flow through the normal bus / spatialization path. Own a copy of the compiled graph; drive it live with SetInput / Trigger, exactly like the game does with a SoundCue.
- Module
- Audio
- Header
#include "Audio/MetaSoundVoice.h"- Namespace
Mowo
Type aliases
| Alias | Description |
|---|---|
using FAssetResolverFn = bool (*)(const std::string& path, FMetaSoundGraph& out) | Resolve a .metasound path to a compiled graph and start a voice. The resolver is installed by the asset layer (Game) so Audio does not depend on the asset system, mirroring SoundCue::SetAssetResolver. |
Constructors
| Signature | Name | Description |
|---|---|---|
MetaSoundVoice() | MetaSoundVoice | |
~MetaSoundVoice() | ~MetaSoundVoice | |
MetaSoundVoice(const MetaSoundVoice&) = delete | MetaSoundVoice |
Public functions
| Returns | Name | Description |
|---|---|---|
MetaSoundVoice& | operator= | |
bool | Initialize | Take the authored graph, prepare it at the engine's sample rate and attach a voice on bus. |
void | SetAssetResolver | |
bool | ResolveAsset | |
bool | InitializeFromAsset | |
void | Shutdown | |
void | Play | |
void | Stop | |
bool | IsPlaying | |
void | SetVolume | |
void | SetSpatial | |
void | SetPosition | |
void | SetInput | |
void | Trigger | |
FMetaSoundGraph& | Graph | |
const FMetaSoundGraph& | Graph |
Function details
MetaSoundVoice
C++
MetaSoundVoice()~MetaSoundVoice
C++
~MetaSoundVoice()MetaSoundVoice
C++
MetaSoundVoice(const MetaSoundVoice&) = deleteoperator=
C++
MetaSoundVoice& operator=(const MetaSoundVoice&) = deleteInitialize
C++
bool Initialize(const FMetaSoundGraph& graph, AudioBus bus = AudioBus::SFX)Take the authored graph, prepare it at the engine's sample rate and attach a voice on bus. Returns false if the engine is down or the graph has no Output reachable path.
SetAssetResolver
C++
static void SetAssetResolver(FAssetResolverFn resolver)ResolveAsset
C++
static bool ResolveAsset(const std::string& path, FMetaSoundGraph& out)InitializeFromAsset
C++
bool InitializeFromAsset(const std::string& path, AudioBus bus = AudioBus::SFX)Shutdown
C++
void Shutdown()Play
C++
void Play()Stop
C++
void Stop()IsPlaying
C++
bool IsPlaying() constSetVolume
C++
void SetVolume(float volume)SetSpatial
C++
void SetSpatial(bool spatial)SetPosition
C++
void SetPosition(float x, float y, float z)SetInput
C++
void SetInput(const std::string& name, float value)Trigger
C++
void Trigger(const std::string& name)Graph
C++
FMetaSoundGraph& Graph()Graph
C++
const FMetaSoundGraph& Graph() constGenerated from Audio/MetaSoundVoice.h via audio.json · Oct 26, 2026Version 1.0.0