It's correct the code for tune Radio Channel?
foreach (ITVCard Tuner in xCards.Cards)
{
if (Tuner is TvCardAnalog)
{
float FrecFMIni = 85.0;
float FrecFMFin = 108.0;
float FrecFMSalto = 0.1;
AnalogChannel xCanal;
for (int nFrecuencia = FrecFMIni; nFrecuencia < FrecFMFin; nFrecuencia += FrecFMSalto)
{
xCanal = new AnalogChannel();
xCanal.Country = countries.GetTunerCountry("Spain");
xCanal.TunerSource = TunerInputType.Antenna;
xCanal.VideoSource = AnalogChannel.VideoInputType.Tuner;
xCanal.Frequency = nFrecuencia * 1000000;
Tuner.Tune(0, (IChannel)xCanal);
Thread.Sleep(1000);
if (Tuner.IsTunerLocked && xCanal.IsRadio)
MsgBox.Show( "Channel Ok" );
}
}
}
Thank's
foreach (ITVCard Tuner in xCards.Cards)
{
if (Tuner is TvCardAnalog)
{
float FrecFMIni = 85.0;
float FrecFMFin = 108.0;
float FrecFMSalto = 0.1;
AnalogChannel xCanal;
for (int nFrecuencia = FrecFMIni; nFrecuencia < FrecFMFin; nFrecuencia += FrecFMSalto)
{
xCanal = new AnalogChannel();
xCanal.Country = countries.GetTunerCountry("Spain");
xCanal.TunerSource = TunerInputType.Antenna;
xCanal.VideoSource = AnalogChannel.VideoInputType.Tuner;
xCanal.Frequency = nFrecuencia * 1000000;
Tuner.Tune(0, (IChannel)xCanal);
Thread.Sleep(1000);
if (Tuner.IsTunerLocked && xCanal.IsRadio)
MsgBox.Show( "Channel Ok" );
}
}
}
Thank's