/// <summary>
        /// Checks the capabilities of the tuner device
        /// </summary>
        /// <returns>true, if the checks were successful</returns>
        private bool CheckCapabilities(Graph graph)
        {
            if (_tuner == null)
            {
                Log.Log.WriteFile("");
                return(false);
            }
            UpdateMinMaxChannel();

            AMTunerModeType tunerModes;

            _tuner.GetAvailableModes(out tunerModes);
            _supportsFMRadio = (AMTunerModeType.FMRadio & tunerModes) != 0;
            _supportsAMRadio = (AMTunerModeType.AMRadio & tunerModes) != 0;
            if (_supportsFMRadio && !_supportsAMRadio)
            {
                graph.Tuner.RadioMode = RadioMode.FM;
            }
            if (!_supportsFMRadio && _supportsAMRadio)
            {
                graph.Tuner.RadioMode = RadioMode.AM;
            }
            if (_supportsFMRadio && _supportsAMRadio)
            {
                graph.Tuner.RadioMode = RadioMode.FM | RadioMode.AM;
            }

            return(true);
        }
Beispiel #2
0
        public void TestGetAvailableModes()
        {
            int             hr = 0;
            AMTunerModeType modesAvailable;

            hr = tuner.GetAvailableModes(out modesAvailable);
            DsError.ThrowExceptionForHR(hr);
            Debug.Assert(hr == 0, "IAMTVTuner.GetAvailableModes");
        }