AUDIO
Source snapshot · 11 November 2026

API reference / ravet_audio_file::audio_ring

Function audio_ring 

pub fn audio_ring(
    channels: usize,
    frames: usize,
) -> Result<(AudioProducer, AudioConsumer), RingError>
Expand description

Prepare an SPSC interleaved f32 ring, channels 1..64 and power-of-two capacity 1..65536 frames. Frame counters wrap safely because capacity is a power of two. Endpoints cannot be cloned; transfers use atomic publication, no locks/I/O. Dropping endpoints can deallocate and belongs after audio callbacks stop.