LocalSource: fixed DSPSignalNotification& message passing to baseband

pull/575/head
f4exb 2020-06-27 05:04:21 +02:00
rodzic eee7640cdd
commit 423476140a
3 zmienionych plików z 6 dodań i 27 usunięć

Wyświetl plik

@ -106,7 +106,7 @@ bool LocalSource::handleMessage(const Message& cmd)
calculateFrequencyOffset(m_settings.m_log2Interp, m_settings.m_filterChainHash);
propagateSampleRateAndFrequency(m_settings.m_localDeviceIndex, m_settings.m_log2Interp);
MsgBasebandSampleRateNotification *msg = MsgBasebandSampleRateNotification::create(cfg.getSampleRate());
DSPSignalNotification *msg = new DSPSignalNotification(cfg.getSampleRate(), cfg.getCenterFrequency());
m_basebandSource->getInputMessageQueue()->push(msg);
if (m_guiMessageQueue)

Wyświetl plik

@ -25,7 +25,6 @@
MESSAGE_CLASS_DEFINITION(LocalSourceBaseband::MsgConfigureLocalSourceBaseband, Message)
MESSAGE_CLASS_DEFINITION(LocalSourceBaseband::MsgConfigureLocalSourceWork, Message)
MESSAGE_CLASS_DEFINITION(LocalSourceBaseband::MsgBasebandSampleRateNotification, Message)
MESSAGE_CLASS_DEFINITION(LocalSourceBaseband::MsgConfigureLocalDeviceSampleSink, Message)
LocalSourceBaseband::LocalSourceBaseband() :
@ -142,13 +141,13 @@ bool LocalSourceBaseband::handleMessage(const Message& cmd)
return true;
}
else if (MsgBasebandSampleRateNotification::match(cmd))
else if (DSPSignalNotification::match(cmd))
{
QMutexLocker mutexLocker(&m_mutex);
MsgBasebandSampleRateNotification& notif = (MsgBasebandSampleRateNotification&) cmd;
qDebug() << "LocalSourceBaseband::handleMessage: MsgBasebandSampleRateNotification: basebandSampleRate: " << notif.getBasebandSampleRate();
m_sampleFifo.resize(SampleSourceFifo::getSizePolicy(notif.getBasebandSampleRate()));
m_channelizer->setBasebandSampleRate(notif.getBasebandSampleRate());
DSPSignalNotification& notif = (DSPSignalNotification&) cmd;
qDebug() << "LocalSourceBaseband::handleMessage: DSPSignalNotification: basebandSampleRate: " << notif.getSampleRate();
m_sampleFifo.resize(SampleSourceFifo::getSizePolicy(notif.getSampleRate()));
m_channelizer->setBasebandSampleRate(notif.getSampleRate());
return true;
}

Wyświetl plik

@ -77,26 +77,6 @@ public:
{ }
};
class MsgBasebandSampleRateNotification : public Message {
MESSAGE_CLASS_DECLARATION
public:
static MsgBasebandSampleRateNotification* create(int sampleRate) {
return new MsgBasebandSampleRateNotification(sampleRate);
}
int getBasebandSampleRate() const { return m_sampleRate; }
private:
MsgBasebandSampleRateNotification(int sampleRate) :
Message(),
m_sampleRate(sampleRate)
{ }
int m_sampleRate;
};
class MsgConfigureLocalDeviceSampleSink : public Message {
MESSAGE_CLASS_DECLARATION