Beispiel #1
0
 /// <summary>
 /// Opens the specified MIDI output device for sending MIDI data.
 /// </summary>
 /// <param name="deviceHandle">A <see cref="MidiDeviceHandle"/> to store the obtained device handle.</param>
 /// <param name="deviceID">An <see cref="int"/> representing the MIDI output device's ID.</param>
 /// <param name="callback">A <see cref="MidiOutputDelegate"/> specifying the callback function to process MIDI messages.</param>
 /// <param name="callbackInstance">An <see cref="IntPtr"/> specifying user instance data passed to the callback function.</param>
 /// <returns>A <see cref="Result"/> value containing the result of the API call.</returns>
 internal static Result OpenMidiOutputDevice(ref MidiDeviceHandle deviceHandle, int deviceID, MidiOutputDelegate callback, IntPtr callbackInstance)
 {
     return(midiOutOpen(ref deviceHandle, deviceID, callback, callbackInstance, callback == null ? MidiOpenFlags.CALLBACK_NULL : MidiOpenFlags.CALLBACK_FUNCTION));
 }
Beispiel #2
0
 private static extern Result midiOutOpen(ref MidiDeviceHandle deviceHandle, int deviceID, MidiOutputDelegate callback, IntPtr callbackInstance, MidiOpenFlags flags);