Skip to main content

Module mix_bus

Module mix_bus 

Source
Expand description

Cross-thread audio mix bus.

Bridge between audio-rendering lanes (main thread, ~60 Hz) and the audio backend’s hardware callback (RT thread, ~kHz). Contributors call AudioMixBus::write_block to push pre-mixed PCM frames; the backend callback calls AudioMixBus::pull to drain the next N samples into the hardware buffer.

The trait abstracts the queue implementation so the v1 ships a simple mutex-backed ringbuffer (DefaultMixBus) and a future PR can swap in a lock-free SPSC/SPMC queue without touching consumers.

Structs§

DefaultMixBus
Mutex-backed ringbuffer impl of AudioMixBus.

Traits§

AudioMixBus
The contract between audio-producing lanes and the audio backend.