Index   Commented   Search   About

midiStreamOut

The midiStreamOut function plays or queues a stream (buffer) of MIDI data to a MIDI output device.

MMRESULT midiStreamOut(

HMIDISTRM hMidiStream,

LPMIDIHDR lpMidiHdr,

UINT cbMidiHdr

);

Parameters

hMidiStream

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

lpMidiHdr

Address of a MIDIHDR structure that identifies the MIDI buffer.

cbMidiHdr

Size, in bytes, of the MIDIHDR structure.

Return Values

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

MMSYSERR_NOMEM
The system is unable to allocate or lock memory.
MIDIERR_STILLPLAYING
The output buffer pointed to by lpMidiHdr is still playing or is queued from a previous call to midiStreamOut.
MIDIERR_UNPREPARED
The header pointed to by lpMidiHdr has not been prepared.
MMSYSERR_INVALHANDLE
The specified device handle is invalid.
MMSYSERR_INVALPARAM
The pointer specified by lpMidiHdr is invalid.

Remarks

Because the midiStreamOpen function opens the output device in paused mode, you must call the midiStreamRestart function before you can use midiStreamOut to start the playback.

For the current implementation of this function, the buffer must be smaller than 64K.

The buffer pointed to by the MIDIHDR structure contains one or more MIDI events, each of which is defined by a MIDIEVENT structure.

See Also

midiStreamOpen
, MIDIHDR, MIDIEVENT

Related Links

Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder

More Online Helps

Win32 Programmer's Reference (win32.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages

Free Tech Secrets ;) Copyright © 2008 Free Tect Secrets ;) greatis just4fun network just4fun