midiStreamStop function (mmeapi.h)

The midiStreamStop function turns off all notes on all MIDI channels for the specified MIDI output device.

Syntax

MMRESULT midiStreamStop(
  HMIDISTRM hms
);

Parameters

hms

Handle to a MIDI stream. This handle must have been returned by a call to the midiStreamOpen function. This handle identifies the output device.

Return value

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

Return code Description
MMSYSERR_INVALHANDLE
The specified device handle is invalid.

Remarks

When you call this function, any pending system-exclusive or stream output buffers are returned to the callback mechanism and the MHDR_DONE bit is set in the dwFlags member of the MIDIHDR structure.

While the midiOutReset function turns off all notes, midiStreamStop turns off only those notes that have been turned on by a MIDI note-on message.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header mmeapi.h (include Windows.h)
Library Winmm.lib
DLL Winmm.dll

See also

MIDI Functions