Once you have determined the capabilities of your Windows CE–based device, you can allocate memory for your audio data blocks. Using the WAVEHDR structure, allocate memory for the waveInAddBuffer and waveOutWrite functions to play sound. The following table shows functions that prepare headers.
Function |
Description |
waveInPrepareHeader | Prepares a waveform-audio input data block |
waveOutPrepareHeader | Prepares a waveform-audio output data block |
Before passing an audio data block to a device driver with waveInAddBuffer or waveOutWrite, call waveInPrepareHeader or waveOutPrepareHeader on the data block. Then pass the data block to waveInAddBuffer or waveOutWrite.