mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-26 09:48:45 -05:00
Deep redesign: reverted message deqeuing changes
This commit is contained in:
parent
3aa4dc710b
commit
7f35fdeb89
@ -228,13 +228,10 @@ quint64 BladerfInput::getCenterFrequency() const
|
||||
|
||||
bool BladerfInput::handleMessage(const Message& message)
|
||||
{
|
||||
qDebug() << "BladerfInput::handleMessage";
|
||||
|
||||
if (MsgConfigureBladerf::match(message))
|
||||
{
|
||||
qDebug() << " - MsgConfigureBladerf";
|
||||
|
||||
MsgConfigureBladerf& conf = (MsgConfigureBladerf&) message;
|
||||
qDebug() << "BladerfInput::handleMessage: MsgConfigureBladerf";
|
||||
|
||||
if (!applySettings(conf.getSettings(), false))
|
||||
{
|
||||
|
@ -608,13 +608,13 @@ void DSPEngine::handleSynchronousMessages()
|
||||
|
||||
void DSPEngine::handleInputMessages()
|
||||
{
|
||||
Message* message;
|
||||
int queueSize = m_inputMessageQueue.size();
|
||||
qDebug() << "DSPEngine::handleInputMessages";
|
||||
|
||||
for (int i = 0; i < queueSize; i++)
|
||||
Message* message;
|
||||
|
||||
while ((message = m_inputMessageQueue.pop()) != 0)
|
||||
{
|
||||
message = m_inputMessageQueue.pop();
|
||||
qDebug() << "DSPEngine::handleInputMessages: " << message->getIdentifier();
|
||||
qDebug("DSPEngine::handleInputMessages: message: %s", message->getIdentifier());
|
||||
|
||||
if (DSPConfigureCorrection::match(*message))
|
||||
{
|
||||
@ -636,11 +636,7 @@ void DSPEngine::handleInputMessages()
|
||||
m_imbalance = 65536;
|
||||
}
|
||||
|
||||
delete message; // delete
|
||||
}
|
||||
else
|
||||
{
|
||||
m_inputMessageQueue.push(message); // repush
|
||||
delete message;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -648,11 +644,9 @@ void DSPEngine::handleInputMessages()
|
||||
void DSPEngine::handleSourceMessages()
|
||||
{
|
||||
Message *message;
|
||||
int queueSize = m_inputMessageQueue.size();
|
||||
|
||||
for (int i = 0; i < queueSize; i++)
|
||||
while ((message = m_sampleSource->getOutputMessageQueue()->pop()) != 0)
|
||||
{
|
||||
message = m_inputMessageQueue.pop();
|
||||
qDebug() << "DSPEngine::handleSourceMessages: " << message->getIdentifier();
|
||||
|
||||
if (DSPSignalNotification::match(*message))
|
||||
@ -689,10 +683,6 @@ void DSPEngine::handleSourceMessages()
|
||||
|
||||
delete message;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_inputMessageQueue.push(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13,20 +13,13 @@ SampleSink::~SampleSink()
|
||||
void SampleSink::handleInputMessages()
|
||||
{
|
||||
Message* message;
|
||||
int queueSize = m_inputMessageQueue.size();
|
||||
|
||||
for (int i = 0; i < queueSize; i++)
|
||||
while ((message = m_inputMessageQueue.pop()) != 0)
|
||||
{
|
||||
message = m_inputMessageQueue.pop();
|
||||
|
||||
if (handleMessage(*message))
|
||||
{
|
||||
delete message;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_inputMessageQueue.push(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,19 +29,12 @@ SampleSource::~SampleSource()
|
||||
void SampleSource::handleInputMessages()
|
||||
{
|
||||
Message* message;
|
||||
int queueSize = m_inputMessageQueue.size();
|
||||
|
||||
for (int i = 0; i < queueSize; i++)
|
||||
while ((message = m_inputMessageQueue.pop()) != 0)
|
||||
{
|
||||
message = m_inputMessageQueue.pop();
|
||||
|
||||
if (handleMessage(*message))
|
||||
{
|
||||
delete message;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_inputMessageQueue.push(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -332,13 +332,12 @@ void MainWindow::applySettings()
|
||||
void MainWindow::handleDSPMessages()
|
||||
{
|
||||
Message* message;
|
||||
MessageQueue* messageQueue = m_dspEngine->getOutputMessageQueue();
|
||||
int queueSize = messageQueue->size();
|
||||
|
||||
for (int i = 0; i < queueSize; i++)
|
||||
while ((message = m_dspEngine->getOutputMessageQueue()->pop()) != 0)
|
||||
{
|
||||
message = messageQueue->pop();
|
||||
qDebug() << "MainWindow::handleDSPMessages: " << message->getIdentifier();
|
||||
qDebug("Message: %s", message->getIdentifier());
|
||||
|
||||
std::cerr << "MainWindow::handleDSPMessages: " << message->getIdentifier() << std::endl;
|
||||
|
||||
if (DSPSignalNotification::match(*message))
|
||||
{
|
||||
@ -353,31 +352,22 @@ void MainWindow::handleDSPMessages()
|
||||
|
||||
delete message;
|
||||
}
|
||||
else
|
||||
{
|
||||
messageQueue->push(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::handleMessages()
|
||||
{
|
||||
Message* message;
|
||||
int queueSize = m_inputMessageQueue.size();
|
||||
|
||||
for (int i = 0; i < queueSize; i++)
|
||||
while ((message = m_inputMessageQueue.pop()) != 0)
|
||||
{
|
||||
message = m_inputMessageQueue.pop();
|
||||
qDebug() << "MainWindow::handleMessages: " << message->getIdentifier();
|
||||
qDebug("Message: %s", message->getIdentifier());
|
||||
std::cerr << "MainWindow::handleMessages: " << message->getIdentifier() << std::endl;
|
||||
|
||||
if (m_pluginManager->handleMessage(*message))
|
||||
if (!m_pluginManager->handleMessage(*message))
|
||||
{
|
||||
delete message;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_inputMessageQueue.push(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user