waveOutBreakLoop(3mms) — Subroutines
Name
waveOutBreakLoop --- Break a loop
Syntax
#include <mme/mme_api.h>
MMRESULT waveOutBreakLoop(HWAVEOUT hWaveOut)
Arguments
HWAVEOUT hWaveOut
Specifies a handle to a waveform audio output device.
Description
The waveOutBreakLoop function breaks a loop on the specified waveform audio output device and allows playback to continue with the next block in the driver list. Waveform looping is controlled by the dwLoops and dwFlags fields in the WAVEHDR data structures passed to the device with the waveOutWrite function. Use the WHDR_BEGINLOOP and WHDR_ENDLOOP flags in the dwFlags field to specify the beginning and ending data blocks for looping.
To loop on a single block, specify both flags for the same block. To specify the number of loops, use the dwLoops field in the WAVEHDR data structure for the first block in the loop.
The blocks making up the loop are played to the end before the loop is terminated.
Calling the waveOutBreakLoop function when nothing is playing or looping has no effect, and the function returns the MMSYSERR_NOERROR error code.
Extensions
None.
Return Values
Returns MMSYSERR_NOERROR if the function is successful; otherwise, it returns one of the following error codes:
MMSYSERR_INVALHANDLE@T{ The specified device handle is invalid. T} MMSYSERR_HANDLEBUSY@T{ The handle hWaveOut is in use on another thread. T}
See Also
waveOutPause(3mms), waveOutRestart(3mms), waveOutWrite(3mms)