Bug in WaveProvider32?

Feb 20, 2010 at 8:49 PM

Hello,

 

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

http://mark-dot-net.blogspot.com/2009/10/playback-of-sine-wave-in-naudio.html

 

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?

-L

 

Feb 20, 2010 at 9: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.

-L

Coordinator
Feb 22, 2010 at 12: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