상속: 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;
 }