mirror of https://github.com/f4exb/sdrangel.git
LocalSource: fixed DSPSignalNotification& message passing to baseband
This commit is contained in:
parent
eee7640cdd
commit
423476140a
|
@ -106,7 +106,7 @@ bool LocalSource::handleMessage(const Message& cmd)
|
||||||
calculateFrequencyOffset(m_settings.m_log2Interp, m_settings.m_filterChainHash);
|
calculateFrequencyOffset(m_settings.m_log2Interp, m_settings.m_filterChainHash);
|
||||||
propagateSampleRateAndFrequency(m_settings.m_localDeviceIndex, m_settings.m_log2Interp);
|
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);
|
m_basebandSource->getInputMessageQueue()->push(msg);
|
||||||
|
|
||||||
if (m_guiMessageQueue)
|
if (m_guiMessageQueue)
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
|
|
||||||
MESSAGE_CLASS_DEFINITION(LocalSourceBaseband::MsgConfigureLocalSourceBaseband, Message)
|
MESSAGE_CLASS_DEFINITION(LocalSourceBaseband::MsgConfigureLocalSourceBaseband, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(LocalSourceBaseband::MsgConfigureLocalSourceWork, Message)
|
MESSAGE_CLASS_DEFINITION(LocalSourceBaseband::MsgConfigureLocalSourceWork, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(LocalSourceBaseband::MsgBasebandSampleRateNotification, Message)
|
|
||||||
MESSAGE_CLASS_DEFINITION(LocalSourceBaseband::MsgConfigureLocalDeviceSampleSink, Message)
|
MESSAGE_CLASS_DEFINITION(LocalSourceBaseband::MsgConfigureLocalDeviceSampleSink, Message)
|
||||||
|
|
||||||
LocalSourceBaseband::LocalSourceBaseband() :
|
LocalSourceBaseband::LocalSourceBaseband() :
|
||||||
|
@ -142,13 +141,13 @@ bool LocalSourceBaseband::handleMessage(const Message& cmd)
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (MsgBasebandSampleRateNotification::match(cmd))
|
else if (DSPSignalNotification::match(cmd))
|
||||||
{
|
{
|
||||||
QMutexLocker mutexLocker(&m_mutex);
|
QMutexLocker mutexLocker(&m_mutex);
|
||||||
MsgBasebandSampleRateNotification& notif = (MsgBasebandSampleRateNotification&) cmd;
|
DSPSignalNotification& notif = (DSPSignalNotification&) cmd;
|
||||||
qDebug() << "LocalSourceBaseband::handleMessage: MsgBasebandSampleRateNotification: basebandSampleRate: " << notif.getBasebandSampleRate();
|
qDebug() << "LocalSourceBaseband::handleMessage: DSPSignalNotification: basebandSampleRate: " << notif.getSampleRate();
|
||||||
m_sampleFifo.resize(SampleSourceFifo::getSizePolicy(notif.getBasebandSampleRate()));
|
m_sampleFifo.resize(SampleSourceFifo::getSizePolicy(notif.getSampleRate()));
|
||||||
m_channelizer->setBasebandSampleRate(notif.getBasebandSampleRate());
|
m_channelizer->setBasebandSampleRate(notif.getSampleRate());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 {
|
class MsgConfigureLocalDeviceSampleSink : public Message {
|
||||||
MESSAGE_CLASS_DECLARATION
|
MESSAGE_CLASS_DECLARATION
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue