jawed
asked on
Describe buffer format for waveOut()
I successfully used the Win32 API waveOut() call to output some sound to my sound blaster.
waveOutWrite() requires the passing of a pointer to a structure that contains information about the sound to be played. One of the members of this structure is the "buffer":
WAVEHDR WaveHeader;
WaveHeader.lpData = buffer;
I tried specifying something like
WaveHeader.lpData = "balljljsdfljweriwoejrasda fafsff";
and as I expected I received random garbage sound.
I'd like someone to explain how the format of the buffer is interpreted exactly (in 8 bit mode). What does the content of the buffer do to the sound that is output? Please point me to a very specific site that explains the format or explain it yourself. Thanks.
waveOutWrite() requires the passing of a pointer to a structure that contains information about the sound to be played. One of the members of this structure is the "buffer":
WAVEHDR WaveHeader;
WaveHeader.lpData = buffer;
I tried specifying something like
WaveHeader.lpData = "balljljsdfljweriwoejrasda
and as I expected I received random garbage sound.
I'd like someone to explain how the format of the buffer is interpreted exactly (in 8 bit mode). What does the content of the buffer do to the sound that is output? Please point me to a very specific site that explains the format or explain it yourself. Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.