Example #1
0
 public bool Open()
 {
     if (this._disposing)
     {
         return(false);
     }
     if (this._device != IntPtr.Zero)
     {
         return(true);
     }
     this._lastError = Midi.MIDI_OutOpen(ref this._device, this._deviceID, this._midiOutProc, new IntPtr(this._deviceID));
     if (this._lastError != MIDIError.MIDI_OK)
     {
         this._device = IntPtr.Zero;
     }
     return(this._device != IntPtr.Zero);
 }