Question

I'm looking for a good audio compression library for .NET. Anything using MP3 is out (because of the licensing issue). Basically I just need to be able to compress regular WAV audio data into some format, and decompress back to WAV. Preferably the code would be all .NET (C# or VB.NET), but I don't think this is likely. It should either be lossless or relatively lossless (as good as 192 MP3s, preferably), with a compression ratio at least as good as 4:1. I'd prefer a buffer-based API, but a file-based API is OK too.

Does anyone know of anything like this?

Was it helpful?

Solution

Have you thought about using WMA? If you use managed C++ or C++/CLI it's very easy to write a managed wrapper around the Windows Media Format SDK. This assembly can then be easily used by a higher level VB.Net or C# assembly. As long as you have WMP installed it even has the advantage of not requiring any additional dependencies.

OTHER TIPS

You've thought about the .OGG format yet? I don't know if a .net library is available, but the libogg and libvorbis C libs aren't rocket-science and well tested. For a simple compress/decompress job you may get away with a two function wrapper that handles all the details.

It should be easy to write a .net wrapper around them.

Benefits:

  • patent free
  • usable licence even for closed source projects
  • very good compression ratio
  • cross platform (maybe not that important since you aim .net, but nevertheless nice to have).
  • last but not least: a very mature library without known bugs and good support.

FLAC looks interesting.

Monkey's Audio is another one (it might even work in .NET).

You might look into OGG codecs. I'm not sure if there are any written in .NET, but it's open source, so if this is important to you, you should be able to to port one easily enough.

OGG Vorbis codec

Have a look at FMod. Is has good audio compression, playing, as well as 3d effects features. It supports lots of audio formats. It is written in C but has a good C# wrapper along with it.

[[http://www.fmod.org/]]

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top