finds.dev← search

// the find

andrewrk/libsoundio

★ 2,104 · C · MIT · updated Jan 2025

C library for cross-platform real-time audio input and output

libsoundio is a thin C abstraction over the native audio backends (JACK, PulseAudio, ALSA, CoreAudio, WASAPI) for real-time audio I/O. It's aimed at people writing DAWs, synths, or audio players in C/C++ who want one API instead of five, without pulling in a huge dependency like PortAudio's build system.

The backend abstraction is done right: it doesn't force you into a fixed-buffer-size model on backends like ALSA/PulseAudio that don't need one, and doesn't fight JACK/CoreAudio's fixed-callback model either — it does whatever is native to each backend. Pure C, no libstdc++, no exceptions/RTTI/setjmp, so it drops into embedded or minimal toolchains cleanly. Error handling is return-code based and every allocation is checked, which matters in an audio callback where you can't allocate or throw. It exposes raw devices for low-latency work and shared devices with format/rate conversion for everything else, and you can have multiple backends connected simultaneously.

The project is effectively dormant — commit activity trailed off years ago and this is maintenance-only; don't expect new backends (no mobile, no BSD beyond generic ALSA) or fixes to land quickly if you hit something backend-specific. Raw-device mode gives you no sample-rate or format conversion, so you're on your own for resampling, which is a real gap for anything targeting arbitrary hardware. The test suite is manual and hardware-dependent (plug in a USB mic, listen for a sine wave, read printed instructions) — there's no CI coverage of the actual audio paths, only `unit_tests` for logic that doesn't touch a device. Windows support is WASAPI-only, so no ASIO, which matters for anyone doing low-latency pro-audio work on Windows.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →