1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-07-25 03:24:18 -04:00

Channel Analyzer / Scope: fixed sample rate handling. Fixes #956

This commit is contained in:
f4exb
2021-07-10 22:41:24 +02:00
parent 8725fa743a
commit 3a3dc0d8c0
4 changed files with 26 additions and 4 deletions
@@ -231,6 +231,7 @@ bool ChannelAnalyzerGUI::handleMessage(const Message& message)
{
DSPSignalNotification& cmd = (DSPSignalNotification&) message;
m_basebandSampleRate = cmd.getSampleRate();
qDebug("ChannelAnalyzerGUI::handleMessage: DSPSignalNotification: m_basebandSampleRate: %d", m_basebandSampleRate);
setSinkSampleRate();
}
@@ -470,6 +471,8 @@ ChannelAnalyzerGUI::ChannelAnalyzerGUI(PluginAPI* pluginAPI, DeviceUISet *device
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_channelAnalyzer = (ChannelAnalyzer*) rxChannel;
m_basebandSampleRate = m_channelAnalyzer->getChannelSampleRate();
qDebug("ChannelAnalyzerGUI::ChannelAnalyzerGUI: m_basebandSampleRate: %d", m_basebandSampleRate);
m_spectrumVis = m_channelAnalyzer->getSpectrumVis();
m_spectrumVis->setGLSpectrum(ui->glSpectrum);
m_scopeVis = m_channelAnalyzer->getScopeVis();
@@ -557,6 +560,7 @@ void ChannelAnalyzerGUI::setSinkSampleRate()
ui->sinkSampleRateText->setText(tr("%1 kS/s").arg(s));
m_scopeVis->setLiveRate(sinkSampleRate == 0 ? 48000 : sinkSampleRate);
ui->scopeGUI->setSampleRate(sinkSampleRate == 0 ? 48000 : sinkSampleRate);
}
void ChannelAnalyzerGUI::setFiltersUIBoundaries()