views:

75

answers:

2

Hi All.

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.

Googling this, I discovered that I might be forced to upsample the 8khz audio myself to 48khz or 44.1khz depending on the soundcard in the PC.

Is there any C# library or generic algorithm I could use for this?

Thanks!!

Roey

A: 

You could always port Secret Rabbit Code to C#?

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

Goz
A: 

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?

selbie