What is the best sound compression library for .NET?

I am looking for a good audio compression library for .NET. Anything that uses MP3 is missing (due to licensing issues). Basically, I just need to be able to compress normal WAV audio data in some format and decompress it back to WAV. Preferably, the code will be all .NET (C # or VB.NET), but I don't think this is likely. It should be either lossless or relatively lossless (for example, 192 MP3, preferably) with a compression ratio of at least 4: 1. I would prefer a buffer-based API, but the file-based API is also OK.

Does anyone know anything like this?

+4
source share
6 answers

Have you thought about using WMA? If you use managed C ++ or C ++ / CLI, it is very easy to write a managed shell around the Windows Media Format SDK. Then this assembly can be easily used with a higher-level VB.Net assembly or C #. As long as you have WMP installed, it even has an advantage that does not require any additional dependencies.

+3
source

Have you thought about the .OGG format? I don't know if the .net library is available, but libbog and libvorbis C libs are not rocket-science and well-tested. For a simple compression / decompression job, you can get away with two functional shells that handle all the details.

It's easy to write a .net wrapper around them.

Benefits:

  • patent
  • useful license even for closed source projects
  • very good compression ratio
  • cross platform (maybe not that important since you are targeting .net, but still nice to have).
  • last but not least: a very mature library with no known bugs and good support.
+1
source

FLAC looks interesting.

+1
source

Monkey Audio is another one (it can even work in .NET).

+1
source

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

OGG Vorbis codec

0
source

Look at the FMod. It has good sound compression, playback, as well as 3D effects functions. It supports many audio formats. It is written in C, but with it has a good C # shell.

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

0
source

Source: https://habr.com/ru/post/1277752/


All Articles