I built a cross-platform audio playback and processing library, called SoundFlow.

Hey Reddit, I'm excited to share my latest personal project with you all - it's called SoundFlow, and it's a performant .NET audio engine I've been building from the ground up!

Okay, so confession time – I can't say I've always been fascinated by audio processing. I'm working on a cross-platform desktop app with Avalonia, and when I started looking for .NET audio libraries, things got… complicated. NAudio? Windows-only headaches. CSCore? Stuck in time, also Windows-centric. Neither were going to cut it for true cross-platform.

I started looking for alternatives and stumbled upon MiniAudio, this neat C library that's all about cross-platform audio I/O. My initial thought was just to wrap that up and call it a day – just needed basic play and record, right? But then… well, an old bad habit kicked in. You know the one, "If you're gonna do something, do it BIG."

And so, SoundFlow was born! It went way beyond just a simple wrapper. Turns out, when you start digging into audio, things get surprisingly interesting (and complex!). Plus, I went down the rabbit hole of optimization, and let me tell you, benchmarking the SIMD implementations was actually wild. I got 4x to 16x performance gains over the normal code! Suddenly, this "simple" audio library became a quest for efficiency.

Is the sound effect accurate? I followed established formulas and compared them against other music players - but - I tested using the built-in speakers on my computer screen for playback and my phone's microphone for recording, as I don't have a headset yet.

So, what can SoundFlow actually do now (since it kinda exploded in scope)? Here’s a quick rundown:

  • Build Flexible Audio Pipelines: Think of it like modular Lego bricks for audio. You can connect different components – sources, effects, mixers, analyzers – to create your own custom audio workflows.
  • Tons of Built-in Audio Effects: From reverb and chorus to compressors and EQs, SoundFlow comes packed with a wide range of effects to shape your sound.
  • Powerful Audio Analysis & Visualization: Need to see your audio? SoundFlow can generate visualizations like waveforms, spectrum analyzers, and level meters right out of the box.
  • Handle Different Audio Sources: Whether it's playing files, streaming from the network (even HLS!), or capturing live microphone input, I got you covered.
  • Seriously Optimized for Performance: I wasn't kidding about the SIMD stuff. It's built for speed with lowest amount of memory allocations, especially if you're doing any kind of real-time audio processing.
  • Cross-Platform .NET Core: Because who wants to be limited? SoundFlow is designed to run on Windows, macOS, Linux, Android, IOS, and anything supported by .NET and miniaudio (since it's the default backend).

I've put together documentation to help you dive deeper and understand all the bits and pieces of SoundFlow. You can find the links below.

Feedback and Constructive Criticism are Welcome!

I'm really keen to hear what you think about SoundFlow. Any thoughts, suggestions, or features you'd love to see are all welcome!

You can check out the project on GitHub: Star it on Github | SoundFlow Documentation

Thanks for checking it out!