views:

488

answers:

4

Do you know of any .NET library which can decode several types of audio files? Ideally, it should be platform agnostic, so it can be used with .NET and Mono - on Windows and *NIX.

I already tortured Google searching for a library which meets my needs, but unfortunately I could not find anything. So before writing a lot of wrapper classes for GStreamer and friends, I thought I could ask here. :)

Supported audio files should be (at least)

  • MP3,
  • OGG Vorbis, and
  • FLAC (optional).

As the application I would need this for is just for fun, the library should be open source - or at least free. Also, a nag screen displayed to a user would probably be bad or impractical, because I am planning on putting this into a service process.

I would need use this library/these libraries in order to decoding audio files and passing a byte[] to my libOFA wrapper, so that I can produce a MusicDNS fingerprint for it. My experimental application would most likely run on a Linux based server.

A: 

If you are talking about decoding the files to play them (i.e. for listening), I'd suggest jumping into the Windows Media Player SDK.

It will play anything that has a codec installed and doesn't cost anything.

http://msdn.microsoft.com/en-us/library/aa969732.aspx

If you want something closer to the metal (i.e. for learning), you might also check out the Windows Media Format SDK.

http://msdn.microsoft.com/en-us/library/aa387410.aspx

therealhoff
Thanks for your suggestion, therealhoff! Unfortunately, this would most likely not work under *NIX and thus not match in for the environment of my small experiment. Anyway, I guess this can be a good help for developing a Windows desktop/server application. :)
hangy
+1  A: 

The FMOD Ex sound system is a revolutionary new audio engine for game developers, multimedia developers, sound designers, musicians and audio engineers. Based on the years of experience from Firelight Technologies' previous products, FMOD Ex aims to push the capabilities of audio for games, whilst at the same time using minimal resources and remaining fully scalable.

FMOD Non-Commercial License

If your product is not intended for commercial gain and does not include the FMOD library for resale, license or other commercial distribution, then use of FMOD is free. Yes that's right, free from license fees!.

CiNN
Impressive list of features, but as I see it, FMOD is a shared library (.so) and cannot be used as a .NET assembly.
hangy
well there is a .net wrapper included
CiNN
Really? Damn, did not see that. Guess I will have a look at it again then.
hangy
+3  A: 

There is the ffmpeg library and utilities that converts audio and video formats. Then, couple with the FFmpeg.NET library, you can do the encoding/decoding in .NET. All the formats you mentioned are supported.

spoulson
A .NET wrapper for ffmpeg sounds great. Unfortunately FFmpeg.NET seems to be unmaintained (last commit 2007-10-09, no release), but a comment on the project mentions FFlib.NET (http://www.intuitive.sk/fflib/) which seems to be in active development and is free (though not OS). Let's see!
hangy
FFmpeg.NET dead? ffmpeg-sharp dead? Tao.FFmpeg really complicated. FFlib.NET no windows, yet. SharpFFmpeg outdated.
hangy
A: 

Alvas.Audio is the only product I've ever seen that does this (and I only learned about it from this post). I think the licensing situation with MP3s has hindered the development of .NET products that do this.

MusiGenesis