flexaudio-mic
Cross-platform microphone capture backend for the flexaudio workspace, built on
cpal.
CpalMicBackend implements the CaptureBackend trait from flexaudio-core. It
opens the default input device (or a named device by ID) and pushes raw interleaved
f32 frames into a RawSink in a non-blocking, RT-safe way. Because cpal::Stream
is !Send, the stream is created and owned on a dedicated thread; only Send-safe
handles (stop flag, JoinHandle, cached format) cross thread boundaries.
Primary test target is Linux/ALSA, but the implementation works on any OS that cpal supports (Linux, Windows, macOS).
Most users should use the
flexaudiofacade crate instead of this one directly. Depend onflexaudio-miconly if you are wiring a custom microphone backend without the full facade.
License
MIT © 2026 tubome / Studio Sadola.