BASS.NET API for the Un4seen BASS Audio Library

MidiMIDI_OutPrepareHeader Method

BASS.NET API for the Un4seen BASS Audio Library
Prepares a MIDI system-exclusive or stream buffer for output.

Namespace:  radio42.Multimedia.Midi
Assembly:  Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax

public static MIDIError MIDI_OutPrepareHeader(
	IntPtr handle,
	IntPtr headerPtr
)

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: MIDIError
Returns 0 if successful or an error code otherwise. For possible error values see MIDIError.
Remarks

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.

See Also

Reference