Share via


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

  1. Set the WHDR_BEGINLOOP and the WHDR_ENDLOOP flags in the dwFlags member of the WAVEHDR structure.

  2. Set the number of loops in the dwLoops member of the same WAVEHDR structure.

  3. Pass the WAVEHDR structure to waveOutWrite.

    This action causes your device to begin looping.

  4. Use the waveOutBreakLoop function to break out of the loop prematurely.

See Also

Concepts

Playing Waveform Audio Files