/// <summary>
        /// Determines whether the specified <see cref="T:System.Object"></see> is equal to the current <see cref="T:System.Object"></see>.
        /// </summary>
        /// <param name="obj">The <see cref="T:System.Object"></see> to compare with the current <see cref="T:System.Object"></see>.</param>
        /// <returns>
        /// true if the specified <see cref="T:System.Object"></see> is equal to the current <see cref="T:System.Object"></see>; otherwise, false.
        /// </returns>
        public override bool Equals(object obj)
        {
            AnalogAudioStream stream = obj as AnalogAudioStream;

            if (stream == null)
            {
                return(false);
            }
            if (_language == stream.Language && _streamType == stream.StreamType && AudioMode == stream.AudioMode)
            {
                return(true);
            }
            return(false);
        }
Beispiel #2
0
 /// <summary>
 /// Detects the capabilities of the tv audio device
 /// </summary>
 private void CheckCapabilities(Graph graph)
 {
   TVAudioMode availableAudioModes;
   _tvAudioTunerInterface.GetHardwareSupportedTVAudioModes(out availableAudioModes);
   graph.TvAudio.AudioModes = availableAudioModes;
   if ((availableAudioModes & (TVAudioMode.Stereo)) != 0)
   {
     AnalogAudioStream stream = new AnalogAudioStream();
     stream.AudioMode = TVAudioMode.Stereo;
     stream.Language = "Stereo";
     streams.Add(stream);
   }
   if ((availableAudioModes & (TVAudioMode.Mono)) != 0)
   {
     AnalogAudioStream stream = new AnalogAudioStream();
     stream.AudioMode = TVAudioMode.Mono;
     stream.Language = "Mono";
     streams.Add(stream);
   }
   if ((availableAudioModes & (TVAudioMode.LangA)) != 0)
   {
     AnalogAudioStream stream = new AnalogAudioStream();
     stream.AudioMode = TVAudioMode.LangA;
     stream.Language = "LangA";
     streams.Add(stream);
   }
   if ((availableAudioModes & (TVAudioMode.LangB)) != 0)
   {
     AnalogAudioStream stream = new AnalogAudioStream();
     stream.AudioMode = TVAudioMode.LangB;
     stream.Language = "LangB";
     streams.Add(stream);
   }
   if ((availableAudioModes & (TVAudioMode.LangC)) != 0)
   {
     AnalogAudioStream stream = new AnalogAudioStream();
     stream.AudioMode = TVAudioMode.LangC;
     stream.Language = "LangC";
     streams.Add(stream);
   }
 }