Compartir a través de


waveOutClose function

The waveOutClose function closes the given waveform-audio output device.

Syntax

MMRESULT waveOutClose(
   HWAVEOUT hwo
);

Parameters

  • hwo
    Handle to the waveform-audio output device. If the function succeeds, the handle is no longer valid after this call.

Return value

Returns MMSYSERR_NOERROR if successful or an error otherwise. Possible error values include the following.

Return code Description
MMSYSERR_INVALHANDLE

Specified device handle is invalid.

MMSYSERR_NODRIVER

No device driver is present.

MMSYSERR_NOMEM

Unable to allocate or lock memory.

WAVERR_STILLPLAYING

There are still buffers in the queue.

 

Remarks

The close operation fails if the device is still playing a waveform-audio buffer that was previously sent by calling waveOutWrite. Before calling waveOutClose, the application must wait for all buffers to finish playing or call the waveOutReset function to terminate playback.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Mmsystem.h (include Windows.h)

Library

Winmm.lib

DLL

Winmm.dll

See also

Waveform Audio

Waveform Functions