1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-04 23:14:47 -04:00

Demod Analyzer: fixed sample rate handling. Fixes #931

This commit is contained in:
f4exb
2021-06-29 21:47:27 +02:00
parent a57c856a26
commit 0d4da317b3
49 changed files with 667 additions and 49 deletions
@@ -24,6 +24,7 @@
#include "SWGFeatureActions.h"
#include "SWGDeviceState.h"
#include "dsp/dspcommands.h"
#include "dsp/dspengine.h"
#include "dsp/datafifo.h"
#include "dsp/dspdevicesourceengine.h"
@@ -149,6 +150,8 @@ bool DemodAnalyzer::handleMessage(const Message& cmd)
MsgSelectChannel& cfg = (MsgSelectChannel&) cmd;
ChannelAPI *selectedChannel = cfg.getChannel();
setChannel(selectedChannel);
MainCore::MsgChannelDemodQuery *msg = MainCore::MsgChannelDemodQuery::create();
selectedChannel->getChannelMessageQueue()->push(msg);
return true;
}
@@ -160,6 +163,10 @@ bool DemodAnalyzer::handleMessage(const Message& cmd)
if (report.getChannelAPI() == m_selectedChannel)
{
m_sampleRate = report.getSampleRate();
m_scopeVis.setLiveRate(m_sampleRate);
DSPSignalNotification *msg = new DSPSignalNotification(0, m_sampleRate);
m_spectrumVis.getInputMessageQueue()->push(msg);
if (m_dataFifo) {
m_dataFifo->setSize(2*m_sampleRate);