waveOutClose

Syntax

WORD waveOutClose(hWaveOut)

This function closes the specified waveform output device.

Parameters

HWAVEOUT hWaveOut

Specifies a handle to the waveform output device. If the function is successful, the handle is no longer valid after this call.

Return Value

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

MMSYSERR_INVALHANDLE

Specified device handle is invalid.

WAVERR_STILLPLAYING

There are still buffers in the queue.

Comments

If the device is still playing a waveform, the close operation will fail. Use waveOutReset to terminate waveform playback before calling waveOutClose.

See Also

waveOutOpen, waveOutReset