Audio

Play sounds on actors, route them through buses and submixes, vary them with sound cues, drive them with parameters, and keep the mix inside a voice budget.

Last updated Oct 26, 2026Edit this pageVersion 1.0.0

Mowo's audio runs on miniaudio. An audio engine owns the output device and a tree of submixes; sound sources play clips into it; and an AudioSource ECS component, wrapped by MAudioComponent on actors, brings sound into a scene. Source files can be WAV, MP3, FLAC, Ogg Vorbis or Opus; they import as .sound assets.

Play a sound on an actor

Add an MAudioComponent to an actor, or place an AAmbientSoundActor. The component mirrors an AudioSource component onto the actor's entity, and the audio system positions the voice from the entity's transform. MAudioComponent

PickupChime.cpp
#include "Game/AActor.h"
#include "Game/MAudioComponent.h"

Mowo::AActor* pickup = nullptr;

if (Mowo::MAudioComponent* chime = pickup->FindComponent<Mowo::MAudioComponent>()) {
	chime->Play();
}

Play(), Stop() and IsPlaying() control it; volume, pitch, loop, spatial and playOnStart are editable in the Details panel.

For a one-shot with no actor, use MAudioStatics: PlaySound2D(clip, volume) for UI and stingers, PlaySoundAtLocation(clip, x, y, z, volume) for a positioned sound. MAudioStatics

The AudioSource component

The ECS component holds everything a source needs. AudioSourceComponent

FieldEffect
clipPath, cuePath, soundCuePathWhat plays: a clip, or a sound cue (a cue takes over the component's own playback settings)
busThe submix it plays into, such as SFX, Music, Voice, Ambient or one of yours
volume, pitch, loop, playOnCreate, streamingPlayback
spatial, minDistance, maxDistance, attenuationModel, rolloff3D falloff; a curve or a .attenuation asset can replace the model
dopplerScale, coneInnerAngle, coneOuterAngle, coneOuterGainDoppler and directional cones
priority0 to 100; decides which voices stay audible over budget
soundClass, concurrencyGroupCategory controls and play-count limits, below
useOcclusion, occlusionSmoothingWalls muffle the sound; see Acoustics
modulationParameterA game parameter that modulates the source

Buses and submixes

Every source plays into a submix, and submixes form a tree that ends at Master. The engine creates Master and its four children Music, SFX, Voice and Ambient. Each submix has its own fader, pitch, mute and effect chain. AudioSubmix

Add your own submixes under any of them with the audio.submixes engine config key (entries of the form Name:Parent:Volume, parents first) or at runtime with AudioEngine::CreateSubmix(name, parent). A source names its submix by string, so a project submix works in the Details panel like a default bus. AudioEngine::CreateSubmix

A source can also send a copy of itself to another submix, such as a shared reverb, with AudioSource::SetSend(submix, level, preFader). AudioSource::SetSend

Change bus levels from gameplay or the settings screen with MAudioStatics::SetBusVolume and SetMasterVolume.

Sound classes, mixes and concurrency

On top of routing, three category controls work across submixes: Engine/Source/Runtime/Audio/Public/Audio/SoundClass.h

  • Sound classes form their own tree with volume, pitch and low-pass. FSoundClasses::SetClassVolume("Footsteps", 0.5f) turns every footstep down wherever it is routed. Declare them with audio.sound_classes.
  • Sound mixes: FSoundClasses::PushMix(name, adjusters) scales named classes until PopMix(name).
  • Concurrency groups (audio.concurrency, entries Name:MaxCount:Rule) cap how many sounds of a kind play at once. When a group is full, the rule decides what gives way: PreventNew, StopOldest, StopFarthest, StopLowestPriority or StopQuietest.

For whole-mix states such as a pause menu or underwater, use mix snapshots; see Music and mixing.

Voice budget

Only the highest-scoring voices are audible. Each playing voice scores its priority plus its effective volume at the listener. The top audio.max_voices (default 32) play; per-bus caps audio.max_voices_sfx, audio.max_voices_music and so on apply on top. Voices below the cap are virtualized: they cost no mixing, but their playback position keeps advancing, so a voice that wins its slot back resumes where it would have been.

Large clips stream from disk instead of loading whole. audio.resident_budget_mb caps the memory used by fully loaded clips; 0 picks a budget from the machine's memory.

Sound cues

A sound cue varies a repeated sound so a footstep or an impact never plays the same sample twice in a row. Two forms exist: SoundCue

AssetAuthored inBehavior
.soundcueSound Cue editor (WavePlayer, Random, Mixer, Modulator, Attenuation, Looping, Output nodes)A Mixer plays each input branch as its own voice, for layered sounds
.cuegraphA simpler MDF cue graphPicks one clip by weight and rolls volume and pitch inside ranges

Cue settings include the bus, a cooldown, an instance cap, avoid-repeat and a caption for subtitles. Each trigger is a fresh one-shot at the entity's position at that moment. FSoundCueAsset

Mowo Editor Sound Cue editor with Impact.soundcue open: two WavePlayer nodes feeding a Mixer, a Random node over three footstep waves, and the Output node's settings pins for bus, cooldown and caption
A Mixer layers branches; a Random node picks one.

Footsteps

A Footstep component plays a cue each time the character travels a stride, picked by the surface under its feet. The cue for a surface is <cueFolder>/<Surface>.cuegraph, falling back to Default.cuegraph, so adding gravel footsteps means dropping Gravel.cuegraph in the folder. strideDistance, sprintStrideScale, crouchStrideScale and stepOnLanding tune it. FootstepComponent

MetaSounds

A MetaSound (.metasound) is a DSP graph that synthesizes or processes sound live. Play one with a MetaSound component (metaSoundPath, bus, volume, spatial, playOnCreate); its inputs can be set from code or bound to game parameters. MetaSoundComponent

Game parameters

Audio parameters are named floats that gameplay sets and sources read, like Wwise RTPCs: tension, health, speed. MAudioStatics::SetAudioParameter(name, value) sets one and SetAudioParameterSmoothing glides it. A source modulates by the parameter named in modulationParameter. MAudioStatics

What the player can hear

MAudioStatics::GetAudibleSoundCount(minLoudness) and its GetAudibleSoundAzimuth, GetAudibleSoundLoudness and GetAudibleSoundCaption siblings list the audible sounds, loudest first, with their direction around the listener and their caption. Use them for a sound compass or directional captions.

Debugging

Command or variableEffect
au.DebugPrints voices, submix meters, concurrency groups, the memory budget and parameters
au.Debug.AttenuationDraws each spatial voice's min and max distance in the viewport
audio.SpatializerNative (miniaudio), Panner, or a spatializer plugin's name
audio.DopplerScaleGlobal doppler multiplier; 0 disables doppler

The editor's Audio panel shows the submix tree with faders and meters. FAudioDebug

Engine sources

This page describes behavior implemented in these files of the engine repository, checked against commit 5922e6e5e.

  • Engine/Source/Runtime/Audio/Public/Audio/AudioEngine.h
  • Engine/Source/Runtime/Audio/Public/Audio/AudioSubmix.h
  • Engine/Source/Runtime/Audio/Public/Audio/AudioSource.h
  • Engine/Source/Runtime/Audio/Public/Audio/AudioSystem.h
  • Engine/Source/Runtime/Audio/Public/Audio/AudioAttenuation.h
  • Engine/Source/Runtime/Audio/Public/Audio/AudioParameters.h
  • Engine/Source/Runtime/Audio/Public/Audio/AudioDebug.h
  • Engine/Source/Runtime/Audio/Public/Audio/AudioSpatialization.h
  • Engine/Source/Runtime/Audio/Public/Audio/SoundClass.h
  • Engine/Source/Runtime/Audio/Public/Audio/SoundCue.h
  • Engine/Source/Runtime/Audio/Public/Audio/SoundCueAsset.h
  • Engine/Source/Runtime/Audio/Public/Audio/MetaSoundGraph.h
  • Engine/Source/Runtime/Audio/Public/Audio/MAudioStatics.h
  • Engine/Source/Runtime/Audio/Public/Audio/Components/AudioSourceComponent.h
  • Engine/Source/Runtime/Audio/Public/Audio/Components/MetaSoundComponent.h
  • Engine/Source/Runtime/Game/Public/Game/MAudioComponent.h
  • Engine/Source/Runtime/Game/Public/Game/AAmbientSoundActor.h
  • Engine/Source/Runtime/Game/Public/Game/Components/FootstepComponent.h
  • Engine/Source/Runtime/Game/Public/Audio/FootstepSystem.h

Page feedback

Was this page helpful?