public static MIDI_OUTCAPS GetInfo(int deviceID) { MIDI_OUTCAPS midi_OUTCAPS = new MIDI_OUTCAPS(); if (Midi.MIDI_OutGetDevCaps(deviceID, midi_OUTCAPS) == MIDIError.MIDI_OK) { return(midi_OUTCAPS); } return(null); }
public static string GetDeviceDescription(int deviceID) { MIDI_OUTCAPS midi_OUTCAPS = new MIDI_OUTCAPS(); if (Midi.MIDI_OutGetDevCaps(deviceID, midi_OUTCAPS) == MIDIError.MIDI_OK) { return(midi_OUTCAPS.name); } return(null); }
public static string[] GetDeviceDescriptions() { List <string> list = new List <string>(); int num = Midi.MIDI_OutGetNumDevs(); MIDI_OUTCAPS midi_OUTCAPS = new MIDI_OUTCAPS(); for (int i = 0; i < num; i++) { if (Midi.MIDI_OutGetDevCaps(i, midi_OUTCAPS) == MIDIError.MIDI_OK) { list.Add(midi_OUTCAPS.name); } } return(list.ToArray()); }
public static int[] GetMidiPorts() { List <int> list = new List <int>(); int num = Midi.MIDI_OutGetNumDevs(); MIDI_OUTCAPS midi_OUTCAPS = new MIDI_OUTCAPS(); for (int i = 0; i < num; i++) { if (Midi.MIDI_OutGetDevCaps(i, midi_OUTCAPS) == MIDIError.MIDI_OK && midi_OUTCAPS.IsMidiPort) { list.Add(i); } } return(list.ToArray()); }
public static MIDIError MIDI_OutGetDevCaps(int deviceID, MIDI_OUTCAPS caps) { return(Midi.midiOutGetDevCaps(new IntPtr(deviceID), caps, Marshal.SizeOf(typeof(MIDI_OUTCAPS)))); }
private static extern MIDIError midiOutGetDevCaps(IntPtr deviceID, [In][Out] MIDI_OUTCAPS caps, int sizeOfMidiOutCaps);