Maudio - all you need audio in one (miniaudio)

⚓ Rust    📅 2026-07-07    👤 surdeus    👁️ 2      

surdeus

For a while now I've been working on maudio and it's very close to a complete interface to miniaudio.

maudio

Miniaudio is a very large audio C library, mainly aimed at game engines, but has pretty much everything you would need for audio. I think discord also uses(used?) it.

Initially, I wanted wanted to only grow it enough so I can make my own audio app with it, but lost interest in that as this was pretty fun. Even found a null ptr dereference bug in miniaudio along the way.

Maudio is technically just ffi library, but it offers a safe, rusty interface to the audio tools that miniaudio has, including custom nodes, custom data sources and data source chaining. I want to eventually also offer a safe(ish?) interface for custom backends as well. It's rather large now, but I did my best to document it and write examples, more to be added.

There is both a low and high level API. The high level API mostly centers around an Engine, which contains a node graph with nodes of various function, a low level device and a resource manager that can reference count loaded audio. This is the 'just play this sound' route.

The low level API uses the low level device directly which supports playback, capture, duplex and loopback.

There's also an encoder, decoder, mixing, many dsp primitives, pcm audio buffer / thread safe ring-buffer, noise, pulse and wave generators, device enumeration, backend selection, raw audio callbacks and some things that I forgot about.

Next on my todo list is to allow using a pre-compiled miniaudio binary, and maybe ship some optional pre-compiled binaries myself.

I'd love to hear some thoughts if anyone has interest in audio.

1 post - 1 participant

Read full topic

🏷️ Rust_feed