1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-13 03:41:47 -05:00

Segfault from interpolator changes.

This commit is contained in:
hexameron 2014-11-25 15:24:21 +00:00
parent 91cba8a035
commit fbae7c7f8e
3 changed files with 10 additions and 8 deletions

View File

@ -51,6 +51,8 @@ private:
void doInterpolate(int phase, Complex* result)
{
if (phase < 0)
phase = 0;
#if 1
// beware of the ringbuffer
if(m_ptr == 0) {

View File

@ -27,8 +27,8 @@ void TCPSrcGUI::setName(const QString& name)
void TCPSrcGUI::resetToDefaults()
{
ui->sampleFormat->setCurrentIndex(0);
ui->sampleRate->setText("25000");
ui->rfBandwidth->setText("20000");
ui->sampleRate->setText("48000");
ui->rfBandwidth->setText("40000");
ui->tcpPort->setText("9999");
ui->spectrumGUI->resetToDefaults();
applySettings();
@ -78,9 +78,9 @@ bool TCPSrcGUI::deserialize(const QByteArray& data)
ui->sampleFormat->setCurrentIndex(0);
break;
}
d.readReal(4, &realtmp, 25000);
d.readReal(4, &realtmp, 48000);
ui->sampleRate->setText(QString("%1").arg(realtmp, 0));
d.readReal(5, &realtmp, 20000);
d.readReal(5, &realtmp, 40000);
ui->rfBandwidth->setText(QString("%1").arg(realtmp, 0));
d.readS32(6, &s32tmp, 9999);
ui->tcpPort->setText(QString("%1").arg(s32tmp));
@ -141,7 +141,7 @@ TCPSrcGUI::TCPSrcGUI(PluginAPI* pluginAPI, QWidget* parent) :
m_spectrumVis->configure(m_threadedSampleSink->getMessageQueue(), 64, 10, FFTWindow::BlackmanHarris);
m_channelMarker = new ChannelMarker(this);
m_channelMarker->setBandwidth(25000);
m_channelMarker->setBandwidth(40000);
m_channelMarker->setCenterFrequency(0);
m_channelMarker->setVisible(true);
connect(m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
@ -170,7 +170,7 @@ void TCPSrcGUI::applySettings()
Real outputSampleRate = ui->sampleRate->text().toDouble(&ok);
if((!ok) || (outputSampleRate < 100))
outputSampleRate = 25000;
outputSampleRate = 48000;
Real rfBandwidth = ui->rfBandwidth->text().toDouble(&ok);
if((!ok) || (rfBandwidth > outputSampleRate))
rfBandwidth = outputSampleRate;

View File

@ -56,7 +56,7 @@
<item row="3" column="1">
<widget class="QLineEdit" name="rfBandwidth">
<property name="text">
<string>20000</string>
<string>40000</string>
</property>
</widget>
</item>
@ -77,7 +77,7 @@
<item row="1" column="1">
<widget class="QLineEdit" name="sampleRate">
<property name="text">
<string>25000</string>
<string>48000</string>
</property>
</widget>
</item>