mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-13 20:01:46 -05:00
Extra samplerates.
This commit is contained in:
parent
ffe78ae105
commit
84c43d517a
@ -55,6 +55,7 @@ void USBDemod::configure(MessageQueue* messageQueue, Real Bandwidth, Real volume
|
||||
/* Fractional Downsample to 48 kHz.
|
||||
* 192 1:4 (3072 / 16)
|
||||
* 144 1:3 (2304 / 16)
|
||||
* 120 2:5 (1920 / 16)
|
||||
* 96 1:2 (1536 / 16)
|
||||
* 72 2:3 ( 288 / 4)
|
||||
* 64 3:4 (1024 / 16)
|
||||
@ -64,7 +65,8 @@ double rerate(int rate)
|
||||
switch (rate)
|
||||
{
|
||||
case 64000 : return (3.0 * 64000); break;
|
||||
case 72000 : return (2.0 * 72000); break;
|
||||
case 72000 :
|
||||
case 120000: return (2.0 * rate); break;
|
||||
case 0 : return (1.0 ) ; break;
|
||||
default : return (1.0 * rate ); break;
|
||||
}
|
||||
@ -83,6 +85,8 @@ void USBDemod::feed(SampleVector::const_iterator begin, SampleVector::const_iter
|
||||
samplestep = 3; // !! FFT buffer length is a power of two
|
||||
if ((m_sampleRate == 64000)||(m_sampleRate == 192000))
|
||||
samplestep = 4; // buffer length should be good
|
||||
if (m_sampleRate == 120000)
|
||||
samplestep = 5;
|
||||
|
||||
for(SampleVector::const_iterator it = begin; it < end; it ++) {
|
||||
a = it->real();
|
||||
@ -90,7 +94,7 @@ void USBDemod::feed(SampleVector::const_iterator begin, SampleVector::const_iter
|
||||
c = Complex(a / 65536.0, b / 65536.0);
|
||||
|
||||
n_out = USBFilter->run(c, &sideband, true);
|
||||
if (m_sampleRate <= 72000)
|
||||
if ((m_sampleRate <= 72000)||(m_sampleRate == 120000))
|
||||
n_out += USBFilter->run(c, &sideband, true);
|
||||
if (m_sampleRate == 64000)
|
||||
n_out += USBFilter->run(c, &sideband, true);
|
||||
|
@ -95,7 +95,7 @@ bool RTLSDRGui::handleMessage(Message* message)
|
||||
void RTLSDRGui::displaySettings()
|
||||
{
|
||||
ui->centerFrequency->setValue(m_generalSettings.m_centerFrequency / 1000);
|
||||
ui->samplerate->setValue(m_settings.m_samplerate);
|
||||
ui->samplerate->setValue(0);
|
||||
|
||||
if(m_gains.size() > 0) {
|
||||
int dist = abs(m_settings.m_gain - m_gains[0]);
|
||||
@ -141,7 +141,7 @@ void RTLSDRGui::on_gain_valueChanged(int value)
|
||||
|
||||
void RTLSDRGui::on_samplerate_valueChanged(int value)
|
||||
{
|
||||
int Rates[] = {288, 1024, 1536, 0};
|
||||
int Rates[] = {288, 1024, 1536, 2048, 2304, 2500 };
|
||||
int newrate = Rates[value];
|
||||
ui->samplerateText->setText(tr("%1k").arg(newrate));
|
||||
m_settings.m_samplerate = newrate * 1000;
|
||||
|
@ -111,7 +111,7 @@
|
||||
<string>Device Samplerate</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>2</number>
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>1</number>
|
||||
|
@ -56,7 +56,7 @@ bool RTLSDRInput::Settings::deserialize(const QByteArray& data)
|
||||
|
||||
if(d.getVersion() == 1) {
|
||||
d.readS32(1, &m_gain, 0);
|
||||
d.readS32(2, &m_samplerate, 0);
|
||||
//d.readS32(2, &m_samplerate, 0);
|
||||
return true;
|
||||
} else {
|
||||
resetToDefaults();
|
||||
|
@ -96,7 +96,7 @@ void RTLSDRThread::decimate4(SampleVector::iterator* it, const quint8* buf, qint
|
||||
for (int pos = 0; pos < len + 7; pos += 8) {
|
||||
xreal = buf[pos+0] - buf[pos+3] + buf[pos+7] - buf[pos+4];
|
||||
yimag = buf[pos+1] - buf[pos+5] + buf[pos+2] - buf[pos+6];
|
||||
Sample s( xreal << 3, yimag << 3 );
|
||||
Sample s( xreal << 4, yimag << 4 );
|
||||
**it = s;
|
||||
(*it)++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user