1

I'm trying to work with raw audio data for manipulation and playback with OpenAL. So far everything works nice and dandy since I've written my own .wav file reader and have been working with that. However, my goal is for people to import their own music. This implies that my program should support various audio formats and codecs, including atleast MP3, Ogg and FLAC.

Now unlike reading a .wav file, the other formats aren't as straightforward. Now I could possibly write my own readers and / or use wrappers of various existing libraries such as libsnd and the ogg library, but I'd rather not reinvent the wheel. So my question is: is there a library already that allows fetching the raw byte audio data from various formats in Mono?

I've taken a look at NAudio, but it's highly dependant on various Win32 API calls, which is a no-go for me as I intend to make my program multi-platform. At the moment I only care about getting the data for reading and playback purposes, I do not intend to manipulate, mix, or any other kind of computational work.

EDIT: One important factor I forgot was licensing. I'd prefer an MIT based licensing or other open license that allow me to use the library for free in commercial software. The BASS.Net library for example is out of the question, as licensing the library is out of my budget.

EDIT2: irrKlang does not support Mono.

Shammah
  • 619
  • 1
  • 5
  • 12
  • 1
    There's my old SO question regarding [playing Ogg/Vorbis purely in .NET](http://stackoverflow.com/q/35896/3205) (including a working solution), but it's not covering other formats. – skolima Feb 16 '13 at 00:53

1 Answers1

0

After giving NAudio another try, I have noticed that they removed some dependencies on the Win32 API. I can now successfully load WAV files through Mono, and there are extensions available that support FLAC and OGG. MP3 support seems to work only for Windows due licensing issues, but that's okay.

Shammah
  • 619
  • 1
  • 5
  • 12
  • I saw on [Naudio discussion](http://naudio.codeplex.com/discussions/266095) this comment from the Naudio author: "I did make a managed MP3 decoder (nlayer.codeplex.com), but haven't had time to integrate this into NAudio properly yet," – chrish May 10 '13 at 15:32