Namespace: radio42.Multimedia.Midi
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.2
Parameters
- handle
- Type: SystemIntPtr
Handle to the MIDI output device. - headerPtr
- Type: SystemIntPtr
Pointer to a MIDI_HEADER structure that identifies the buffer to be prepared.
Return Value
Type: MIDIErrorReturns 0 if successful or an error code otherwise. For possible error values see MIDIError.
A stream buffer cannot be larger than 64K.
Preparing a header that has already been prepared has no effect, and the function returns 0.
After the header has been prepared, do not modify the buffer. To free the buffer, use the MIDI_OutUnprepareHeader(IntPtr, IntPtr) function.
Before using this function, you must set the data, bufferLength, and flags members of the MIDI_HEADER structure. The flags member must be set to zero.
For convenience the Prepare(Boolean, IntPtr) might also be used, which calls MIDI_InPrepareHeader(IntPtr, IntPtr) internally and provides the prepared header pointer in it's HeaderPtr member. In order to convert an IntPtr (e.g. as given in the MIDIINPROC with the MIM_LONGDATA or MIM_LONGERROR as param1) back to a MIDI_HEADER structure use the appropriate constructor overload of the MIDI_HEADER class taking a headerPtr.