mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-05-23 18:52:28 -04:00
Segfault from interpolator changes.
This commit is contained in:
parent
91cba8a035
commit
fbae7c7f8e
@ -51,6 +51,8 @@ private:
|
|||||||
|
|
||||||
void doInterpolate(int phase, Complex* result)
|
void doInterpolate(int phase, Complex* result)
|
||||||
{
|
{
|
||||||
|
if (phase < 0)
|
||||||
|
phase = 0;
|
||||||
#if 1
|
#if 1
|
||||||
// beware of the ringbuffer
|
// beware of the ringbuffer
|
||||||
if(m_ptr == 0) {
|
if(m_ptr == 0) {
|
||||||
|
@ -27,8 +27,8 @@ void TCPSrcGUI::setName(const QString& name)
|
|||||||
void TCPSrcGUI::resetToDefaults()
|
void TCPSrcGUI::resetToDefaults()
|
||||||
{
|
{
|
||||||
ui->sampleFormat->setCurrentIndex(0);
|
ui->sampleFormat->setCurrentIndex(0);
|
||||||
ui->sampleRate->setText("25000");
|
ui->sampleRate->setText("48000");
|
||||||
ui->rfBandwidth->setText("20000");
|
ui->rfBandwidth->setText("40000");
|
||||||
ui->tcpPort->setText("9999");
|
ui->tcpPort->setText("9999");
|
||||||
ui->spectrumGUI->resetToDefaults();
|
ui->spectrumGUI->resetToDefaults();
|
||||||
applySettings();
|
applySettings();
|
||||||
@ -78,9 +78,9 @@ bool TCPSrcGUI::deserialize(const QByteArray& data)
|
|||||||
ui->sampleFormat->setCurrentIndex(0);
|
ui->sampleFormat->setCurrentIndex(0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
d.readReal(4, &realtmp, 25000);
|
d.readReal(4, &realtmp, 48000);
|
||||||
ui->sampleRate->setText(QString("%1").arg(realtmp, 0));
|
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));
|
ui->rfBandwidth->setText(QString("%1").arg(realtmp, 0));
|
||||||
d.readS32(6, &s32tmp, 9999);
|
d.readS32(6, &s32tmp, 9999);
|
||||||
ui->tcpPort->setText(QString("%1").arg(s32tmp));
|
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_spectrumVis->configure(m_threadedSampleSink->getMessageQueue(), 64, 10, FFTWindow::BlackmanHarris);
|
||||||
|
|
||||||
m_channelMarker = new ChannelMarker(this);
|
m_channelMarker = new ChannelMarker(this);
|
||||||
m_channelMarker->setBandwidth(25000);
|
m_channelMarker->setBandwidth(40000);
|
||||||
m_channelMarker->setCenterFrequency(0);
|
m_channelMarker->setCenterFrequency(0);
|
||||||
m_channelMarker->setVisible(true);
|
m_channelMarker->setVisible(true);
|
||||||
connect(m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
connect(m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
||||||
@ -170,7 +170,7 @@ void TCPSrcGUI::applySettings()
|
|||||||
|
|
||||||
Real outputSampleRate = ui->sampleRate->text().toDouble(&ok);
|
Real outputSampleRate = ui->sampleRate->text().toDouble(&ok);
|
||||||
if((!ok) || (outputSampleRate < 100))
|
if((!ok) || (outputSampleRate < 100))
|
||||||
outputSampleRate = 25000;
|
outputSampleRate = 48000;
|
||||||
Real rfBandwidth = ui->rfBandwidth->text().toDouble(&ok);
|
Real rfBandwidth = ui->rfBandwidth->text().toDouble(&ok);
|
||||||
if((!ok) || (rfBandwidth > outputSampleRate))
|
if((!ok) || (rfBandwidth > outputSampleRate))
|
||||||
rfBandwidth = outputSampleRate;
|
rfBandwidth = outputSampleRate;
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
<item row="3" column="1">
|
<item row="3" column="1">
|
||||||
<widget class="QLineEdit" name="rfBandwidth">
|
<widget class="QLineEdit" name="rfBandwidth">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>20000</string>
|
<string>40000</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -77,7 +77,7 @@
|
|||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QLineEdit" name="sampleRate">
|
<widget class="QLineEdit" name="sampleRate">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>25000</string>
|
<string>48000</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user