public static string[] GetDeviceDescriptions() { List <string> list = new List <string>(); int num = Midi.MIDI_InGetNumDevs(); MIDI_INCAPS midi_INCAPS = new MIDI_INCAPS(); for (int i = 0; i < num; i++) { if (Midi.MIDI_InGetDevCaps(i, midi_INCAPS) == MIDIError.MIDI_OK) { list.Add(midi_INCAPS.name); } } return(list.ToArray()); }
public static int[] GetMidiPorts() { List <int> list = new List <int>(); int num = Midi.MIDI_InGetNumDevs(); MIDI_INCAPS caps = new MIDI_INCAPS(); for (int i = 0; i < num; i++) { if (Midi.MIDI_InGetDevCaps(i, caps) == MIDIError.MIDI_OK) { list.Add(i); } } return(list.ToArray()); }
public static int GetDeviceCount() { return(Midi.MIDI_InGetNumDevs()); }