mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-02-03 09:44:01 -05:00
Fixed possible sample device pointer not set yet when DSPMIMOSignalNotification message arrives. Fixes #1529
This commit is contained in:
parent
b387de17bc
commit
12deb59bf4
@ -1186,6 +1186,8 @@ void DSPDeviceMIMOEngine::handleInputMessages()
|
||||
(*it)->pushMessage(message);
|
||||
}
|
||||
|
||||
if (m_deviceSampleMIMO)
|
||||
{
|
||||
if (sourceElseSink)
|
||||
{
|
||||
if ((istream < m_deviceSampleMIMO->getNbSourceStreams()))
|
||||
@ -1252,6 +1254,7 @@ void DSPDeviceMIMOEngine::handleInputMessages()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
delete message;
|
||||
}
|
||||
|
@ -267,8 +267,7 @@ DSPDeviceSinkEngine::State DSPDeviceSinkEngine::gotoIdle()
|
||||
break;
|
||||
}
|
||||
|
||||
if(m_deviceSampleSink == 0)
|
||||
{
|
||||
if (!m_deviceSampleSink) {
|
||||
return StIdle;
|
||||
}
|
||||
|
||||
@ -304,8 +303,7 @@ DSPDeviceSinkEngine::State DSPDeviceSinkEngine::gotoInit()
|
||||
break;
|
||||
}
|
||||
|
||||
if (m_deviceSampleSink == 0)
|
||||
{
|
||||
if (!m_deviceSampleSink) {
|
||||
return gotoError("DSPDeviceSinkEngine::gotoInit: No sample source configured");
|
||||
}
|
||||
|
||||
@ -362,7 +360,7 @@ DSPDeviceSinkEngine::State DSPDeviceSinkEngine::gotoRunning()
|
||||
break;
|
||||
}
|
||||
|
||||
if(m_deviceSampleSink == 0) {
|
||||
if (!m_deviceSampleSink) {
|
||||
return gotoError("DSPDeviceSinkEngine::gotoRunning: No sample source configured");
|
||||
}
|
||||
|
||||
@ -370,8 +368,7 @@ DSPDeviceSinkEngine::State DSPDeviceSinkEngine::gotoRunning()
|
||||
|
||||
// Start everything
|
||||
|
||||
if(!m_deviceSampleSink->start())
|
||||
{
|
||||
if (!m_deviceSampleSink->start()) {
|
||||
return gotoError("DSPDeviceSinkEngine::gotoRunning: Could not start sample sink");
|
||||
}
|
||||
|
||||
@ -533,7 +530,8 @@ void DSPDeviceSinkEngine::handleInputMessages()
|
||||
}
|
||||
|
||||
// forward changes to listeners on DSP output queue
|
||||
|
||||
if (m_deviceSampleSink)
|
||||
{
|
||||
MessageQueue *guiMessageQueue = m_deviceSampleSink->getMessageQueueToGUI();
|
||||
qDebug("DSPDeviceSinkEngine::handleInputMessages: DSPSignalNotification: guiMessageQueue: %p", guiMessageQueue);
|
||||
|
||||
@ -541,6 +539,7 @@ void DSPDeviceSinkEngine::handleInputMessages()
|
||||
{
|
||||
DSPSignalNotification* rep = new DSPSignalNotification(*notif); // make a copy for the output queue
|
||||
guiMessageQueue->push(rep);
|
||||
}
|
||||
}
|
||||
|
||||
delete message;
|
||||
|
@ -392,8 +392,7 @@ DSPDeviceSourceEngine::State DSPDeviceSourceEngine::gotoIdle()
|
||||
break;
|
||||
}
|
||||
|
||||
if(m_deviceSampleSource == 0)
|
||||
{
|
||||
if (!m_deviceSampleSource) {
|
||||
return StIdle;
|
||||
}
|
||||
|
||||
@ -428,8 +427,7 @@ DSPDeviceSourceEngine::State DSPDeviceSourceEngine::gotoInit()
|
||||
break;
|
||||
}
|
||||
|
||||
if (m_deviceSampleSource == 0)
|
||||
{
|
||||
if (!m_deviceSampleSource) {
|
||||
return gotoError("No sample source configured");
|
||||
}
|
||||
|
||||
@ -487,7 +485,7 @@ DSPDeviceSourceEngine::State DSPDeviceSourceEngine::gotoRunning()
|
||||
break;
|
||||
}
|
||||
|
||||
if(m_deviceSampleSource == NULL) {
|
||||
if (!m_deviceSampleSource) {
|
||||
return gotoError("DSPDeviceSourceEngine::gotoRunning: No sample source configured");
|
||||
}
|
||||
|
||||
@ -495,8 +493,7 @@ DSPDeviceSourceEngine::State DSPDeviceSourceEngine::gotoRunning()
|
||||
|
||||
// Start everything
|
||||
|
||||
if(!m_deviceSampleSource->start())
|
||||
{
|
||||
if (!m_deviceSampleSource->start()) {
|
||||
return gotoError("Could not start sample source");
|
||||
}
|
||||
|
||||
@ -532,7 +529,7 @@ void DSPDeviceSourceEngine::handleSetSource(DeviceSampleSource* source)
|
||||
|
||||
m_deviceSampleSource = source;
|
||||
|
||||
if(m_deviceSampleSource != 0)
|
||||
if (m_deviceSampleSource)
|
||||
{
|
||||
qDebug("DSPDeviceSourceEngine::handleSetSource: set %s", qPrintable(source->getDeviceDescription()));
|
||||
connect(m_deviceSampleSource->getSampleFifo(), SIGNAL(dataReady()), this, SLOT(handleData()), Qt::QueuedConnection);
|
||||
@ -673,7 +670,8 @@ void DSPDeviceSourceEngine::handleInputMessages()
|
||||
}
|
||||
|
||||
// forward changes to source GUI input queue
|
||||
|
||||
if (m_deviceSampleSource)
|
||||
{
|
||||
MessageQueue *guiMessageQueue = m_deviceSampleSource->getMessageQueueToGUI();
|
||||
qDebug("DSPDeviceSourceEngine::handleInputMessages: DSPSignalNotification: guiMessageQueue: %p", guiMessageQueue);
|
||||
|
||||
@ -682,8 +680,7 @@ void DSPDeviceSourceEngine::handleInputMessages()
|
||||
DSPSignalNotification* rep = new DSPSignalNotification(*notif); // make a copy for the source GUI
|
||||
guiMessageQueue->push(rep);
|
||||
}
|
||||
|
||||
//m_outputMessageQueue.push(rep);
|
||||
}
|
||||
|
||||
delete message;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user