// ReSharper restore FieldCanBeMadeReadOnly.Local #endregion #region Public Indexers /// <summary> /// Gets or sets the audio channel of the specified type. /// </summary> /// <param name="channelType">Type of the audio channel.</param> /// <returns>Audio channel of the specified type.</returns> public AudioChannel this[AudioChannelType channelType] { get { var audioChannel = this.audioChannels.FirstOrDefault(channel => channel.Type == channelType); if (audioChannel == null) { audioChannel = new AudioChannel { Type = channelType }; this.audioChannels.Add(audioChannel); } return audioChannel; } }