From 23e5ef76d4f03e0b321a7d54cfab1eca9bdd5c28 Mon Sep 17 00:00:00 2001 From: f4exb Date: Tue, 2 Jan 2018 11:00:00 +0100 Subject: [PATCH] Device sink engine: fixed adding source channels while it runs --- sdrbase/dsp/dspdevicesinkengine.cpp | 10 ++++++++-- sdrbase/dsp/upchannelizer.cpp | 6 +++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/sdrbase/dsp/dspdevicesinkengine.cpp b/sdrbase/dsp/dspdevicesinkengine.cpp index 31662fbc8..53d39895b 100644 --- a/sdrbase/dsp/dspdevicesinkengine.cpp +++ b/sdrbase/dsp/dspdevicesinkengine.cpp @@ -481,7 +481,10 @@ void DSPDeviceSinkEngine::handleSynchronousMessages() m_basebandSampleSources.push_back(source); checkNumberOfBasebandSources(); - if (m_state == StRunning) { + if (m_state == StRunning) + { + DSPSignalNotification notif(m_sampleRate, m_centerFrequency); + source->handleMessage(notif); source->start(); } } @@ -502,7 +505,10 @@ void DSPDeviceSinkEngine::handleSynchronousMessages() m_threadedBasebandSampleSources.push_back(threadedSource); checkNumberOfBasebandSources(); - if (m_state == StRunning) { + if (m_state == StRunning) + { + DSPSignalNotification notif(m_sampleRate, m_centerFrequency); + threadedSource->handleSourceMessage(notif); threadedSource->start(); } } diff --git a/sdrbase/dsp/upchannelizer.cpp b/sdrbase/dsp/upchannelizer.cpp index 1f978c222..d171c3d65 100644 --- a/sdrbase/dsp/upchannelizer.cpp +++ b/sdrbase/dsp/upchannelizer.cpp @@ -174,7 +174,11 @@ void UpChannelizer::applyConfiguration() { if (m_outputSampleRate == 0) { - qDebug() << "UpChannelizer::applyConfiguration: m_outputSampleRate=0 aborting"; + qDebug() << "UpChannelizer::applyConfiguration: aborting (out=0):" + << " out =" << m_outputSampleRate + << ", req =" << m_requestedInputSampleRate + << ", in =" << m_currentInputSampleRate + << ", fc =" << m_currentCenterFrequency; return; }