//********************************* Инициализация Midi-In ******************** public int InInit() { callbackreciever = new MidiReciever(MidiEvent); // Количество девайсов NumInDev = MIDIInGetNumDevs(); if (NumInDev == 0) { MessageBox.Show("Midi-in device not found!"); return(-1); } return((int)NumInDev); }
private static extern uint midiInOpen(ref IntPtr lphMidin, uint uDeviceID, MidiReciever dwCallback, IntPtr dwInstance, uint dwFlags);
private uint MIDIInOpen(ref IntPtr lphMidiIn, uint uInDeviceID, MidiReciever dwCallback, IntPtr dwInstance, uint dwFlags) { return(midiInOpen(ref lphMidiIn, uInDeviceID, dwCallback, dwInstance, dwFlags)); }