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

AliasDescription
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

SignatureNameDescription
MetaSoundVoice()MetaSoundVoice
~MetaSoundVoice()~MetaSoundVoice
MetaSoundVoice(const MetaSoundVoice&) = deleteMetaSoundVoice

Public functions

ReturnsNameDescription
MetaSoundVoice&operator=
boolInitializeTake the authored graph, prepare it at the engine's sample rate and attach a voice on bus.
voidSetAssetResolver
boolResolveAsset
boolInitializeFromAsset
voidShutdown
voidPlay
voidStop
boolIsPlaying
voidSetVolume
voidSetSpatial
voidSetPosition
voidSetInput
voidTrigger
FMetaSoundGraph&Graph
const FMetaSoundGraph&Graph

Function details

MetaSoundVoice

C++
MetaSoundVoice()

~MetaSoundVoice

C++
~MetaSoundVoice()

MetaSoundVoice

C++
MetaSoundVoice(const MetaSoundVoice&) = delete

operator=

C++
MetaSoundVoice& operator=(const MetaSoundVoice&) = delete

Initialize

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() const

SetVolume

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() const
Generated from Audio/MetaSoundVoice.h via audio.json · Oct 26, 2026Version 1.0.0