Esempio n. 1
0
        public Task <IMidiDevice> OpenDevice(string id)
        {
            var devices = GetDevices().ToArray();
            var device  = devices.First(i => i.Id == id);

            return(Task.FromResult((IMidiDevice) new IOSMidiDevice(this, CMidi.GetDevice(Array.IndexOf(devices, device)), device)));
        }
Esempio n. 2
0
        IEnumerable <MidiEntity> EnumerateMidiEntities()
        {
            var dcount = MIDI.DeviceCount;

            for (nint d = 0; d < dcount; d++)
            {
                var dev    = MIDI.GetDevice(d);
                var ecount = dev.EntityCount;
                for (nint e = 0; e < ecount; e++)
                {
                    yield return(dev.GetEntity(e));
                }
            }
        }
Esempio n. 3
0
 public IEnumerable <MidiDeviceDetails> GetDevices()
 {
     return(Enumerable.Range(0, (int)CMidi.DeviceCount).Select(i => CreateMidiDeviceDetails(CMidi.GetDevice(i))));
 }