AudioSubmix
One node of the submix tree: a mixer group with its own fader, pitch and ordered effect chain, feeding its parent. Sources attach to a submix by name, so the five default buses (Master, Music, SFX, Voice, Ambient) are just the submixes the engine creates first, and a project adds its own under any of them (audio.submixes in Config/Engine.ini, or CreateSubmix at runtime). The engine owns every instance; a pointer stays valid until RemoveSubmix or Shutdown.
- Module
- Audio
- Header
#include "Audio/AudioSubmix.h"- Namespace
Mowo
Signal flow: children and sources → group (fader, pitch) → effects in order → parent's group (the endpoint for the root).
Constructors
| Signature | Name | Description |
|---|---|---|
AudioSubmix() | AudioSubmix | Engine-only: the engine creates and destroys every submix. |
~AudioSubmix() | ~AudioSubmix | |
AudioSubmix(const AudioSubmix&) = delete | AudioSubmix |
Public functions
| Returns | Name | Description |
|---|---|---|
const std::string& | GetName | |
AudioSubmix* | GetParent | |
const std::vector<AudioSubmix*>& | GetChildren | |
bool | IsRoot | |
bool | IsUnder | True when ancestor is this submix or any submix above it. |
void | SetVolume | |
float | GetVolume | |
void | SetPitch | |
float | GetPitch | |
void | SetMuted | Mute keeps the fader value: unmuting restores it. |
bool | IsMuted | |
void | SetModulation | Parameter modulation (FAudioParameters::BindSubmix), multiplied onto the fader and the pitch. |
float | GetModulationVolume | |
float | GetModulationPitch | |
bool | AddEffect | Ordered DSP chain between this group and the parent. |
bool | RemoveEffect | |
void | ClearEffects | |
size_t | GetEffectCount | |
AudioEffect* | GetEffect | |
ma_sound_group* | GetGroup | Where sources and child groups attach. |
ma_node* | GetInputNode | |
uint32_t | GetAttachedSourceCount | |
void | AttachSource | |
void | DetachSource | |
AudioSubmix& | operator= |
Function details
AudioSubmix
AudioSubmix()Engine-only: the engine creates and destroys every submix. Public so the engine's Scope<> can construct and delete it.
~AudioSubmix
~AudioSubmix()AudioSubmix
AudioSubmix(const AudioSubmix&) = deleteGetName
const std::string& GetName() constGetParent
AudioSubmix* GetParent() constGetChildren
const std::vector<AudioSubmix*>& GetChildren() constIsRoot
bool IsRoot() constIsUnder
bool IsUnder(const AudioSubmix* ancestor) constTrue when ancestor is this submix or any submix above it.
SetVolume
void SetVolume(float volume)GetVolume
float GetVolume() constSetPitch
void SetPitch(float pitch)GetPitch
float GetPitch() constSetMuted
void SetMuted(bool muted)Mute keeps the fader value: unmuting restores it.
IsMuted
bool IsMuted() constSetModulation
void SetModulation(float volumeScale, float pitchScale)Parameter modulation (FAudioParameters::BindSubmix), multiplied onto the fader and the pitch. Kept apart from both so a snapshot or the player's slider moving the fader never erases it, and it never erases them.
GetModulationVolume
float GetModulationVolume() constGetModulationPitch
float GetModulationPitch() constAddEffect
bool AddEffect(Ref<AudioEffect> effect)Ordered DSP chain between this group and the parent. Index 0 is closest to the group. An effect lives in exactly one chain.
RemoveEffect
bool RemoveEffect(AudioEffect* effect)ClearEffects
void ClearEffects()GetEffectCount
size_t GetEffectCount() constGetEffect
AudioEffect* GetEffect(size_t index) constGetGroup
ma_sound_group* GetGroup()Where sources and child groups attach. Sources count themselves in and out so removal can refuse while anything still plays through here.
GetInputNode
ma_node* GetInputNode()GetAttachedSourceCount
uint32_t GetAttachedSourceCount() constAttachSource
void AttachSource()DetachSource
void DetachSource()operator=
AudioSubmix& operator=(const AudioSubmix&) = delete