Francois PIETTE wrote:
Hi !

I'm writing a small application which has to generate audio waveform
using the sound card (PCM, 11025KHz, stereo, 8 bits). I'm using
waveOutWrite and related API function.

For now, I have a single buffer. As I understand, audio samples are
one byte for left, one byte for right up to the end of buffer.

Only for mono, eight-bit audio.

I compute the waveform (a simple sinusoide for my test, different
frequency on each channel), store the bytes in the buffer and play
the sound. I use an oscilloscope to see the generated waveform.

When I set a single channel, that is having one byte with the
computed value and one byte with value 128, I get the correct
waveform shown on the oscilloscope whatever channel I compute. But
when I compute both channels, I get strange results: left channel is
the
some of computed left channel and a fraction of right channel; right
channel is the sum of right channel and a fraction of left channel.
See attached screen dump.

I don't understand why this happend !
Any help appreciated.


I have some source code here:
 http://www.satsignal.eu/software/audio.html#ToneBurst

I tend to use 16-bit stereo, so it's two 16-bit words for a full audio sample. Hope my code helps.

Cheers,
David
--
SatSignal software - quality software written to your requirements
Web:  www.satsignal.eu
Email: [email protected]

_______________________________________________
Delphi mailing list -> [email protected]
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi

Reply via email to