Ejemplo n.º 1
0
 public bool Open()
 {
     if (this._disposing)
     {
         return(false);
     }
     if (this._device != IntPtr.Zero)
     {
         return(true);
     }
     this._lastError = Midi.MIDI_InOpen(ref this._device, this._deviceID, this._midiInProc, new IntPtr(this._deviceID), MIDIFlags.MIDI_IO_STATUS);
     if (this._lastError != MIDIError.MIDI_OK)
     {
         this._device = IntPtr.Zero;
     }
     else
     {
         this._shortMsgOnStack = null;
     }
     return(this._device != IntPtr.Zero);
 }