struct

MetaSoundComponent

MetaSoundComponent — a placeable MetaSound voice on an entity. Mirrors AudioSourceComponent's lifecycle contract: the AudioSystem resolves the .metasound graph on the first tick that sees the path, spins up a MetaSoundVoice on the chosen bus, seeds its control-input defaults, plays it when playOnCreate is set, follows the entity's transform while spatial, and tears the voice down when the component (or entity) goes away. Play/Stop/ SetInput/Trigger post requests the AudioSystem drains onto the live voice, so gameplay drives a running graph exactly like it drives a SoundCue.

Module
Audio
Header
#include "Audio/Components/MetaSoundComponent.h"
Namespace
Mowo
Reflection
Reflected by MowoHeaderTool

Properties

TypeNameDescription
boolenabledDefault true.
std::stringmetaSoundPathA .metasound graph asset. Resolved through the resolver the asset layer installs (Game), or straight off the VFS in headless hosts.
std::stringbusDefault "SFX".
floatvolumeDefault 1.0f.
boolspatialDefault true.
boolplayOnCreateDefault false.
std::vector<FMetaSoundInputDefault>controlInputsSeeded onto the voice once, right after it initializes.
std::vector<FMetaSoundParameterLink>parameterLinks
MetaSoundVoice*voiceRuntime state (managed by AudioSystem). Default nullptr.
boolresolveAttemptedDefault false.
boolinitializedDefault false.
boolplayRequestedDefault false.
boolstopRequestedDefault false.
std::vector<FMetaSoundInputDefault>pendingInputs
std::vector<std::string>pendingTriggers
Vec3prevPosition

Public functions

ReturnsNameDescription
voidPlayPost a play/stop the AudioSystem services next tick.
voidStop
voidSetInputQueue a control-input write.
voidTriggerQueue a trigger pulse for the named graph input.

Function details

Play

C++
void Play()

Post a play/stop the AudioSystem services next tick. Play cancels a pending stop and vice-versa so the last call in a frame wins.

Stop

C++
void Stop()

SetInput

C++
void SetInput(const std::string& inputName, float value)

Queue a control-input write. A later write to the same input overwrites the earlier one, so a frame that sets an input twice ships one value.

Trigger

C++
void Trigger(const std::string& inputName)

Queue a trigger pulse for the named graph input.

Generated from Audio/Components/MetaSoundComponent.h via audio.json · Oct 26, 2026Version 1.0.0