This project has moved and is read-only. For the latest updates, please go here.

Bug in WaveProvider32?

Feb 20, 2010 at 9:49 PM



I've implemented the following using NAudio 1.3, a sampling rate of 44.1Khz and 2 channels:


However, when I play the sine wave I get a frequency that is twice that which I am computing i.e. if I compute a 1000Hz wave, what I'm hearing coming out of the speakers is actually 2000Hz. Anyone else see this?



Feb 20, 2010 at 10:07 PM

On further experimentation, this only seems to be happening with 2-channel output. Specifying single channel produces the correct pitch. Fortunately my application only requires single channel output.


Feb 22, 2010 at 1:57 PM

the code to create the sine wave needs to double-up each sample (one for left channel, one for right channel) if you are delivering stereo audio