docs.rs failed to build flexaudio-0.2.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
flexaudio
Flexible, cross-platform audio capture for Rust. Capture from microphones, system output (loopback), and individual processes on Linux, Windows, and macOS through one unified API.
use ;
let mut stream = open?;
stream.start?;
while let Some = stream.poll_chunk
stream.stop;
# Ok::
Capability matrix
| Source | Linux | Windows | macOS |
|---|---|---|---|
| Microphone | ✅ cpal/ALSA | ✅ cpal/WASAPI | ✅ cpal/CoreAudio |
| System output | ✅ PipeWire | ✅ WASAPI loopback | ✅ CoreAudio taps |
| Per-process | ✅ PipeWire | ✅ WASAPI process | ✅ CoreAudio taps |
Highlights
open(StreamConfig)selects the right backend by source + OS.Stream::poll_chunk/poll_event— simple pull loop; no callbacks required.Stream::switch_source— hot-swap source without stopping the stream.devices()/watch_devices()— enumeration and hotplug notifications.- Output is normalized interleaved
f32at a sample rate / channel count you choose (two-stage resampling internally).
Install
Permissions
Audio capture requires user consent: macOS TCC (kTCCServiceAudioCapture, add
NSAudioCaptureUsageDescription to Info.plist), the Windows Microphone privacy
setting, and a running PipeWire session on Linux for system/process capture. See
the workspace README.
On macOS, system/process loopback (Core Audio process taps) requires macOS 14.4 or later.
MSRV
Rust 1.85.
License
MIT © 2026 tubome / Studio Sadola. Third-party notices:
THIRD_PARTY_NOTICES.md.