C# resample audio from 8khz to 44.1/48khz

霸气de小男生 提交于 2019-12-01 23:53:42

For Alvas.Audio see code below

byte[] data48khz = AudioCompressionManager.Convert(format8khz, format48khz, data8khz, false);

You could always port Secret Rabbit Code to C#?

Or how about using the Audio Compression Manager directly via platform invoke?

Your issues of "sounds being played back too fast" may be soundcard specific. Not sure which OS you are on, but I believe Windows natively upsamples all audio streams to either 44 or 48khz before directing the samples to the soundcard (so it can properly mix it with all the other streams). So I'm not sure if you upsample with your own code if you'll get any improvements.

Have you tried using a different PC (running a different OS) or plugging in some USB headphones to see if this issue is consistent?

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