What's the best audio compression library for .NET?

不想你离开。 提交于 2019-11-30 18:02:08

问题


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?


回答1:


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.




回答2:


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.



回答3:


FLAC looks interesting.




回答4:


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




回答5:


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




回答6:


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/]]



来源:https://stackoverflow.com/questions/203254/whats-the-best-audio-compression-library-for-net

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!