Inheritance: RtMidiDevice
示例#1
0
 public override Task OpenAsync()
 {
     Connection = MidiPortConnectionState.Pending;
     impl       = MidiDeviceManager.OpenInput(((RtMidiPortDetails)Details).RawId);
     Connection = MidiPortConnectionState.Open;
     return(completed_task);
 }
示例#2
0
        public static RtMidiInputDevice OpenInput(int deviceID)
        {
            var dev = new RtMidiInputDevice();

            dev.OpenPort(deviceID, GetDeviceInfo(deviceID).Name);
            return(dev);
        }
示例#3
0
 public override Task OpenAsync()
 {
     Connection = MidiPortConnectionState.Pending;
     impl = MidiDeviceManager.OpenInput (((RtMidiPortDetails) Details).RawId);
     Connection = MidiPortConnectionState.Open;
     return completed_task;
 }
示例#4
0
 public unsafe override Task OpenAsync()
 {
     Connection = MidiPortConnectionState.Pending;
     impl       = MidiDeviceManager.OpenInput(((RtMidiPortDetails)Details).RawId);
     impl.SetCallback((timestamp, message, size, userData) => {
         var bytes = new byte [size];
         System.Runtime.InteropServices.Marshal.Copy((IntPtr)message, bytes, 0, (int)size);
         MessageReceived(this, new MidiReceivedEventArgs {
             Data = bytes, Start = 0, Length = bytes.Length, Timestamp = (long)timestamp
         });
     }, IntPtr.Zero);
     Connection = MidiPortConnectionState.Open;
     return(completed_task);
 }
示例#5
0
 public static RtMidiInputDevice OpenInput(int deviceID)
 {
     var dev = new RtMidiInputDevice ();
     dev.OpenPort (deviceID, GetDeviceInfo (deviceID).Name);
     return dev;
 }