Exemplo n.º 1
0
        void TestGetHW()
        {
            int         hr;
            TVAudioMode modes;

            hr = m_itva.GetHardwareSupportedTVAudioModes(out modes);
            DsError.ThrowExceptionForHR(hr);

            // my card returns 17
            Debug.Assert(modes > 0, "GetAvailableTVAudioModes");
        }
Exemplo n.º 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);
            }
        }