Пример #1
0
 public MidiInput(MidiPortDetails details, MidiOutputPort port)
     : base(details, () => port.Close())
 {
     this.port = port;
     receiver  = new Receiver(this);
     port.Connect(receiver);
 }
 public OpenDeviceListener(AndroidMidiAccess parent, MidiDevice device, MidiPortDetails portToOpen)
 {
     if (parent == null)
     {
         throw new ArgumentNullException(nameof(parent));
     }
     if (portToOpen == null)
     {
         throw new ArgumentNullException(nameof(portToOpen));
     }
     this.parent  = parent;
     this.device  = device;
     port_to_open = portToOpen;
 }
Пример #3
0
 protected MidiPort(MidiPortDetails details, Action onClose)
 {
     this.details = details;
     on_close     = onClose;
     connection   = MidiPortConnectionState.Open;
 }
Пример #4
0
 public MidiOutput(MidiPortDetails details, MidiInputPort port)
     : base(details, () => port.Close())
 {
     this.port = port;
 }