1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-01 21:54:55 -04:00

RTLSDR plugin: continuous sample rate setting

This commit is contained in:
f4exb
2017-04-02 02:00:05 +02:00
parent f91eba5b10
commit 365154767a
10 changed files with 154 additions and 227 deletions
-50
View File
@@ -16,56 +16,6 @@
#include "devicehackrfvalues.h"
const unsigned int HackRFSampleRates::m_nb_rates = 22;
const unsigned int HackRFSampleRates::m_rates[HackRFSampleRates::m_nb_rates] = {
2400000,
2600000,
3000000,
3150000, // for PAL-M
3200000,
3250000, // For PAL-BGIL
4000000,
4333333, // for GSM
4800000,
5600000,
6000000,
6300000, // for PAL-M
6400000,
6500000, // For PAL-BGIL
8000000,
9600000,
12000000,
12800000,
16000000,
18000000,
19200000,
20000000};
unsigned int HackRFSampleRates::getRate(unsigned int rate_index)
{
if (rate_index < m_nb_rates)
{
return m_rates[rate_index];
}
else
{
return m_rates[0];
}
}
unsigned int HackRFSampleRates::getRateIndex(unsigned int rate)
{
for (unsigned int i=0; i < m_nb_rates; i++)
{
if (rate == m_rates[i])
{
return i;
}
}
return 0;
}
const unsigned int HackRFBandwidths::m_nb_bw = 16;
const unsigned int HackRFBandwidths::m_bw_k[HackRFBandwidths::m_nb_bw] = {
1750,