Skip to main content

Module realtime

Module realtime 

Source
Expand description

Real-time audio output via cpal. Lock-free SPSC ring buffer path only.

Structs§

AudioDeviceInfo
Information about an available audio output device.
FeederBundle
Send half of a split PlaybackHandle. Owns the producer plus all the metadata flags. Move this into the audio feeder thread.
PlaybackHandle
Owns a real-time audio playback resource.
StreamKeeper
!Send half of a split PlaybackHandle. Owns the cpal::Stream. Must stay on the thread that called start_playback_lockfree, OR be Box::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.