audio-guidelisted
Install: claude install-skill xonovex/platform
# Low-level Audio Guidelines (Real-Time Software Mixing)
Engine-agnostic architecture for a software audio mixer: a real-time render thread feeds the device, voices are summed into the output buffer, and the game thread talks to the audio thread only through a lock-free queue. The lock-free queue itself is owned by **lock-free-guide**; preallocated pools by **memory-management-guide**; struct-of-arrays voice state by **data-oriented-design-guide**.
## Essentials
- **Mix in float, ramp every gain** - Accumulate voices in deinterleaved float through a gain matrix; never snap a gain or you click, see [references/mixing-and-buffers.md](references/mixing-and-buffers.md)
## The render path
- **Render quantum** - Produce fixed-size blocks sized to fit the device buffer; bounds per-block cost, see [references/audio-callback-thread.md](references/audio-callback-thread.md)
- **Queue ahead, sleep on the event** - Top up ~1.5 quanta, then wait on the device's buffer-low event, see [references/audio-callback-thread.md](references/audio-callback-thread.md)
- **Latency vs buffer size** - Bigger buffers resist underrun but add latency; tune against the worst real device, see [references/audio-callback-thread.md](references/audio-callback-thread.md)
## Mixing and signal
- **Gain matrix `m[ic][oc]`** - Volume, pan, and spatialization are all one per-voice input->output matrix, see [references/mixing-and-buffers.md](references/mixing-and-buffers.md)
- **Fit before output** - Scale the su