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

前端 未结 3 1669
时光说笑
时光说笑 2021-01-22 17:58

I have encountered a bug in DirectShow .NET where I create a secondary buffer with a sample rate of 8khz, and upon playback, the sound plays back at approx. 8.1khz instead.

3条回答
  •  梦毁少年i
    2021-01-22 18:28

    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?

提交回复
热议问题