class

AudioEffect

Base for every DSP node we put on a bus. Owns one ma_node*-shaped object — derived classes pick which ma_*_node they wrap and how to interpret their config. Lifetime: created via the AudioEngine::CreateXxxEffect factories (which need engine init), destroyed by ~AudioEffect after the engine has detached the node from the graph.

Module
Audio
Header
#include "Audio/AudioEffect.h"
Namespace
Mowo

Threading: parameter mutators (e.g. SetCutoff) run on the game thread but the reinit they need is not safe against the audio thread reading the same coefficients. So a mutator only *publishes* the new values; the audio thread applies them between blocks, from the engine's process callback. Bypass uses ma_node_set_state, which is lock-safe and needs none of this.

Constructors

SignatureNameDescription
explicit AudioEffect(AudioEffectType type)AudioEffect
virtual ~AudioEffect()~AudioEffect
AudioEffect(const AudioEffect&) = deleteAudioEffect

Public functions

ReturnsNameDescription
AudioEffect&operator=
AudioEffectTypeGetType
ma_node*GetNodeUnderlying ma_node — used by AudioEngine to wire the effect into the bus chain.
boolIsBypassedBypass via node state.
voidSetBypassed
voidDrainPendingParamsAudio thread only: applies whatever the game thread last published.

Function details

AudioEffect

C++
explicit AudioEffect(AudioEffectType type)

~AudioEffect

C++
virtual ~AudioEffect()

AudioEffect

C++
AudioEffect(const AudioEffect&) = delete

operator=

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

GetType

C++
AudioEffectType GetType() const

GetNode

C++
virtual ma_node* GetNode() = 0

Underlying ma_node — used by AudioEngine to wire the effect into the bus chain. nullptr until the concrete subclass's Init() has run.

IsBypassed

C++
bool IsBypassed() const

Bypass via node state. When stopped, miniaudio passes input through to output unmodified (zero cost). Lock-safe — can be flipped from anywhere.

SetBypassed

C++
void SetBypassed(bool bypass)

DrainPendingParams

C++
void DrainPendingParams()

Audio thread only: applies whatever the game thread last published. Cheap when nothing changed — one relaxed load.

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