waveOutBreakLoop

  MMRESULT waveOutBreakLoop(hWaveOut)    
  HWAVEOUT hWaveOut;    

The waveOutBreakLoop function breaks a loop on a given waveform output device and allows playback to continue with the next block in the driver list.

Parameters

hWaveOut

Specifies a handle to the waveform output device.

Return Value

Returns zero if the function was successful. Otherwise, it returns an error number. Possible error returns are:

Value Meaning

MMSYSERR_INVALHANDLE Specified device handle is invalid.
MMSYSERR_HANDLEBUSY The handle hWaveOut is in use on another thread.

Comments

Waveform looping is controlled by the dwLoops and dwFlags fields in the WAVEHDR structures passed to the device with waveOutWrite. 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 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 this function when the nothing is playing or looping has no effect, and the function returns zero.

See Also

waveOutWrite, waveOutPause, waveOutRestart