Exemplo n.º 1
0
        public static MidiDevice.Info[] getMidiDeviceInfo()
        {
            int num = getMidiIn().Count + getMidiOut().Count;

            MidiDevice.Info[] arr = new MidiDevice.Info[num];
            int i = 0;

            foreach (MidiDeviceInfoImpl info in getMidiIn())
            {
                arr[i] = (MidiDevice.Info)(MidiDeviceInfoImpl) info.clone();
                i++;
            }
            foreach (MidiDeviceInfoImpl info in getMidiOut())
            {
                arr[i] = (MidiDevice.Info)(MidiDeviceInfoImpl) info.clone();
            }
            return(arr);
        }
Exemplo n.º 2
0
 public static MidiDevice getMidiDevice(MidiDevice.Info info)
 {
     foreach (MidiDeviceInfoImpl i in getMidiIn())
     {
         if (i.equals(info))
         {
             return(new MidiDeviceTransmitterImpl(i));
         }
     }
     foreach (MidiDeviceInfoImpl i in getMidiOut())
     {
         if (i.equals(info))
         {
             return(new MidiDeviceReceiverImpl(i));
         }
     }
     // javaではIllegalArgumentException
     throw new ArgumentException();
 }
Exemplo n.º 3
0
 public static MidiDevice.Info[] getMidiDeviceInfo()
 {
     int num = getMidiIn().Count + getMidiOut().Count;
     MidiDevice.Info[] arr = new MidiDevice.Info[num];
     int i = 0;
     foreach( MidiDeviceInfoImpl info in getMidiIn() ){
         arr[i] = (MidiDevice.Info)(MidiDeviceInfoImpl)info.clone();
         i++;
     }
     foreach( MidiDeviceInfoImpl info in getMidiOut() ){
         arr[i] = (MidiDevice.Info)(MidiDeviceInfoImpl)info.clone();
     }
     return arr;
 }