Expand description
Spatial audio mixer — buses, ducking, reverb send, stereo panning, distance attenuation.
The mixer is structured around named buses:
- Music bus: looping background audio, cross-fades on vibe change
- SFX bus: one-shot sound effects with 3D attenuation
- Ambient bus: looping environmental drones
- UI bus: non-spatial UI sounds
The master bus applies limiting and optional reverb send before output.
Structs§
- Bus
- Volume and mute state for a single bus.
- Channel
Strip - A 3D positioned audio source channel.
- Compressor
- RMS compressor for dynamic range control.
- Limiter
- Simple lookahead peak limiter to prevent clipping.
- Mixer
- The master audio mixer — manages buses, channels, and effects.
- Stereo
Frame - A stereo audio frame (left, right) in [-1, 1].
Enums§
- Attenuation
Model - Model for how volume decreases with distance.
- BusId
- Named audio bus identifiers.
Functions§
- attenuate
- Compute volume [0, 1] from distance and attenuation model.
- spatial_
weight - Mix weight for a source given listener position and source position.
- stereo_
pan - Compute stereo pan from a 3D position relative to listener. Returns (left, right) gain in [0, 1].