1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-24 10:50:29 -05:00

Down/Up channelizers: enqeue MsgChannelizerNotification to sample sink/source instead of processing it directly

This commit is contained in:
f4exb 2017-12-29 05:14:40 +01:00
parent 324aaa86b6
commit c6083ea6f4
4 changed files with 14 additions and 4 deletions

View File

@ -185,8 +185,8 @@ void DownChannelizer::applyConfiguration()
if (m_sampleSink != 0) if (m_sampleSink != 0)
{ {
MsgChannelizerNotification notif(m_currentOutputSampleRate, m_currentCenterFrequency); MsgChannelizerNotification *notif = MsgChannelizerNotification::create(m_currentOutputSampleRate, m_currentCenterFrequency);
m_sampleSink->handleMessage(notif); m_sampleSink->getInputMessageQueue()->push(notif);
} }
} }

View File

@ -49,6 +49,11 @@ public:
int getSampleRate() const { return m_sampleRate; } int getSampleRate() const { return m_sampleRate; }
qint64 getFrequencyOffset() const { return m_frequencyOffset; } qint64 getFrequencyOffset() const { return m_frequencyOffset; }
static MsgChannelizerNotification* create(int samplerate, qint64 frequencyOffset)
{
return new MsgChannelizerNotification(samplerate, frequencyOffset);
}
private: private:
int m_sampleRate; int m_sampleRate;
qint64 m_frequencyOffset; qint64 m_frequencyOffset;

View File

@ -196,8 +196,8 @@ void UpChannelizer::applyConfiguration()
if (m_sampleSource != 0) if (m_sampleSource != 0)
{ {
MsgChannelizerNotification notif(m_outputSampleRate, m_currentInputSampleRate, m_currentCenterFrequency); MsgChannelizerNotification *notif = MsgChannelizerNotification::create(m_outputSampleRate, m_currentInputSampleRate, m_currentCenterFrequency);
m_sampleSource->handleMessage(notif); m_sampleSource->getInputMessageQueue()->push(notif);
} }
} }

View File

@ -51,6 +51,11 @@ public:
int getSampleRate() const { return m_sampleRate; } int getSampleRate() const { return m_sampleRate; }
qint64 getFrequencyOffset() const { return m_frequencyOffset; } qint64 getFrequencyOffset() const { return m_frequencyOffset; }
static MsgChannelizerNotification* create(int basebandSampleRate, int samplerate, qint64 frequencyOffset)
{
return new MsgChannelizerNotification(basebandSampleRate, samplerate, frequencyOffset);
}
private: private:
int m_basebandSampleRate; int m_basebandSampleRate;
int m_sampleRate; int m_sampleRate;