How to play non-PCM file or convert it to PCM on the fly ?

狂风中的少年 提交于 2019-12-01 18:57:24

Look at audiolab library from mitov. It works great

Arioch 'The

So, do you want to PLAY the file or CONVERT it ? What is the primary goal ? Do you play it as a prove you can convert it, or do you convert it because you don't know how to play not-converted file ? http://www.catb.org/esr/faqs/smart-questions.html#goal

Your question's title claims "convert" but the body claims "Play"

This answer is about playing files.


You also may try to use FFDShow codecs directly without DirectX intermediate. http://en.wikipedia.org/wiki/Libavcodec and http://libav.org/ and http://ffmpeg.org/ (they recently had a schism)

Googling for "FFDShow dotnet", "libav dotnet", "ffmpeg dotnet" shows a bunch of libraries to use it, such as


There is also BASS library. It is targeted as sound playback during gaming, so it probably has less range of formats and not much for re-coding. Still many music players are built on top of it. Some says it is the most simple API to use. So it worth considering. http://www.un4seen.com/


http://MediaInfo.sf.net is a library (native win32/win64 DLL) allowing to check most multimedia formats content. I don't know if using tis C or C++ APis is easy from C# side.

The way to do it is to use newkie's code at: http://www.codeproject.com/Articles/175030/PlaySound-A-Better-Way-to-Play-Wav-Files-in-C?msg=4366037#xx4366037xx

In my case, at least, I had to change all of the lowercase x's to uppercase x's, though, to get it to work.

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