开发者

Is there a .NET library to Normalize PCM WAV

I want to normalize PCM WAV files from client side(Silverlight). I am using ASP.NET MVC on the server side. And I found a C program here

https://neon1.net/prog/normalizer.html Does anyone know that if there are similar C# libraries that I can use开发者_JAVA百科 directly?


"Normalizing" audio files is generally not a great idea, since if there is just one sample at full volume, then it will have no effect. A better approach would be to run a dynamic range compressor on the audio.

In Skype Voice Changer I have written sample code that uses NAudio and passes audio through dynamic range compressors. However, as others have said, NAudio isn't directly usable in Silverlight due to interop. But you should be able to copy WaveFileReader, WaveFormat and WaveFileWriter out and compile them without needing to make too many code changes. Also, you won't be able to use the WaveBuffer mechanism for casting between arrays of bytes and shorts/floats, so you need to do the conversion the slow way (e.g. using BitConverter).


Some ideas (aside of trying NAudio or Bass.NET)

  1. Call the compiled c executable
  2. Compile it as a dll and use P/Invoke
  3. Convert the C code to c#
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜