Expand description
Real-time audio output via cpal. Lock-free SPSC ring buffer path only.
Structs§
- Audio
Device Info - Information about an available audio output device.
- Feeder
Bundle Sendhalf of a splitPlaybackHandle. Owns the producer plus all the metadata flags. Move this into the audio feeder thread.- Playback
Handle - Owns a real-time audio playback resource.
- Stream
Keeper !Sendhalf of a splitPlaybackHandle. Owns thecpal::Stream. Must stay on the thread that calledstart_playback_lockfree, OR beBox::leak’d if you need cross-thread reconnect.
Functions§
- list_
output_ devices - Enumerate all available audio output devices with their supported configs.
- null_
playback - Silent fallback handle for when no audio device is available. Mixer math and IPC still run; nothing reaches speakers. App stays alive.
- start_
headphone_ output - Start headphone/booth output on a second audio device. Returns None if no second device is available (graceful fallback). The feeder thread pushes headphone_mix samples to the returned producer.
- start_
playback_ lockfree - Start real-time audio playback using a lock-free SPSC ring buffer.
- start_
playback_ lockfree_ with_ error_ flag - Inner implementation that optionally accepts an existing error flag for reconnect scenarios.