Assembly: Bass.Net (in Bass.Net.dll) Version: 188.8.131.52
public bool Prepare( bool input, IntPtr handle )
Public Function Prepare ( input As Boolean, handle As IntPtr ) As Boolean
- Type: SystemBoolean
Dealing with a Midi input device? (=input, =output).
- Type: SystemIntPtr
The handle to the MIDI device.
Return ValueType: Boolean
on success (use the HeaderPtr to access the prepared MIDIHDR structure) - else .
Note: This method allocates unmanaged memory and copies this MIDI_HEADER structure to that memory. So there is no need to keep a reference to the MIDI_HEADER instance in your application, since you will be notified in a MIDIINPROC or MIDIOUTPROC when the Midi device has finished with the buffer and provides back a pointer to the MIDIHDR structure. You might then use the constructor overload taking a headerPtr to (re)create an instance of this class.
Make sure, that you always call Unprepare(Boolean, IntPtr) in order to release all unmanaged recourses (this is at best done within the callback procedure)!