8

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.

hangy
  • 10,765
  • 6
  • 43
  • 63
  • Seems you already located Alvas.Audio (per the nag screen). I really like it but has the disadvantages you already noticed :) – Vinko Vrsalovic Sep 27 '08 at 15:53
  • Yep, I already stumbled upon Alvas.Audio. I would not really care for the nagscreen in the free version if it was a desktop application, because the libary seems quite nice anyway, but a service application with a nag screen will just not work, I guess. :/ – hangy Sep 27 '08 at 15:56

4 Answers4

3

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
  • 21,335
  • 15
  • 77
  • 102
  • 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 Sep 27 '08 at 16:28
  • FFmpeg.NET dead? ffmpeg-sharp dead? Tao.FFmpeg really complicated. FFlib.NET no windows, yet. SharpFFmpeg outdated. – hangy Sep 27 '08 at 21:21
1

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
  • 9,752
  • 6
  • 44
  • 57
0

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
  • 2,375
  • 3
  • 16
  • 20
  • 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 Sep 27 '08 at 15:52
0

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
  • 74,184
  • 40
  • 190
  • 334