Looping Playback (Windows Embedded CE 6.0)
1/6/2010
You can loop the playback of a single audio buffer. To control how the playback loops, use the WAVEHDR structure passed to waveOutWrite.
To loop playback
Set the WHDR_BEGINLOOP and the WHDR_ENDLOOP flags in the dwFlags member of the WAVEHDR structure.
Set the number of loops in the dwLoops member of the same WAVEHDR structure.
Pass the WAVEHDR structure to waveOutWrite.
This action causes your device to begin looping.
Use the waveOutBreakLoop function to break out of the loop prematurely.