Expand description
Audio capture: a microphone via cpal (pure-Rust: CoreAudio / WASAPI /
ALSA), or macOS system audio via ScreenCaptureKit.
Producer::open opens one source, and Producer::consume creates
independent readers for bus channels and encoded tracks. Drive Producer::run
alongside them. Every reader shares the layout, samples, capture timestamps,
and source gaps. A slow reader skips expired buffers without delaying others.
Device callbacks keep their bounded, preallocated handoff. The producer copies each buffer out once before sharing it, so a reader never holds a realtime allocation. Stopping or failing capture ends every reader with the same error; dropping a reader only releases that reader.
A microphone that can hear the speaker takes an
aec::Control through Config::aec, which runs
in that same callback so the buffers leaving here are already clean.
Structs§
- Buffer
- One shared block of interleaved f32 capture samples.
- Config
- Audio capture configuration.
- Consumer
- An independent reader of one capture’s samples and fixed layout.
- Device
- An audio input reported by
devices. - Producer
- One open device feeding independent capture consumers.
Enums§
- Source
- Where the audio comes from.
Functions§
- devices
- List the audio inputs.