Example #1
0
        public static async Task <bool> OpenInput(string inputDeviceName)
        {
            var inputInfo = AvailableInputDevices.SingleOrDefault(i => i.Name.ToLower() == inputDeviceName.ToLower());

            if (inputInfo == default)
            {
                return(false);
            }
            ActiveInputDevices[inputDeviceName] = new MidiInputDevice(await AccessManager.OpenInputAsync(inputInfo.Id));
            Logger.WriteLine("Successfully opened input device {0}", inputDeviceName);
            return(true);
        }