private InputDevice device; // Ссылка на физическое устройство #endregion Fields #region Constructors /// <summary> /// Канал на звуковом устройстве. /// </summary> /// <param name="aChannelInfo">Данные канала, отношения.</param> /// <param name="aDevice">Физическое устройство.</param> /// <param name="aGroup">Группа, к которой принадлежит канал.</param> public InChannel(InChannelInfo aChannelInfo, InputDevice aDevice) { if (aChannelInfo == null) { throw new ArgumentNullException("aChannelInfo"); } if (aDevice == null) { throw new ArgumentNullException("aDevice"); } device = aDevice; channelInfo = aChannelInfo; }
/// <summary> /// Заполняет входные каналы. /// </summary> /// <param name="aDeviceInfo">Описание устройства ввода.</param> /// <param name="aDevice">Устройство ввода.</param> private void FillInChannels(InputDeviceInfo aDeviceInfo, InputDevice aDevice) { var channelsCount = aDeviceInfo.GetChannelsCount(); if (channelsCount > aDevice.GetChannelsCount()) { throw new ArgumentException("Сhannels count on phisical device is less than in configuration"); } for (var channelIndex = 0; channelIndex < channelsCount; ++channelIndex) { var channelInfo = aDeviceInfo.GetChannel(channelIndex); var channel = new InChannel(channelInfo, aDevice); inChannels.Add(channel); } }