游戏中的.NET Framework 2 PCM数据? [英] Play PCM data in .NET Framework 2?
问题描述
我有U-法融为一体pressed PCM数据流,我从相机中提取,我需要发挥这一点的音箱?任何人都知道?我已经尝试了U-法解码成正常的WAV数据,然后使用声音播放,但它似乎永远不会工作!始终声音播放只支持PCM数据?
I have a stream of u-Law compressed PCM data I am extracting from a Camera, I need to play this out the speakers? Anybody know how? I've tried decoding the u-Law into normal WAV Data and then use SoundPlayer but it never seems to work! Always SoundPlayer only supports PCM Data?
我知道听起来不错,因为我已经将它保存到一个文件中(使用自定义createWavHeader法)和iTunes可以玩。
I know the sounds ok, because I have saved it to a file (using a custom createWavHeader method) and iTunes can play it.
推荐答案
Windows自带的ACM codeC到u律转化为PCM。您可以使用 n音讯,并使用WaveFileReader和WaveFormatConversionStream得到一个PCM流就可以轻松玩
Windows comes with an ACM codec to convert u-law to PCM. You can use NAudio and use the WaveFileReader and the WaveFormatConversionStream to get a PCM stream you can play easily.
这篇关于游戏中的.NET Framework 2 PCM数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!