Trying.. still one stuck in the queue on delete..

This commit is contained in:
Charles J. Cliffe
2016-06-07 21:12:30 -04:00
parent 50bfb251f8
commit 2bdefca263
2 changed files with 19 additions and 20 deletions
+8 -8
View File
@@ -409,6 +409,14 @@ void AudioThread::run() {
}
}
while (!inputQueue->empty()) { // flush queue
AudioThreadInput *dummy;
inputQueue->pop(dummy);
if (dummy) {
dummy->setRefCount(0);
}
}
if (threadQueueNotify != NULL) {
DemodulatorThreadCommand tCmd(DemodulatorThreadCommand::DEMOD_THREAD_CMD_AUDIO_TERMINATED);
tCmd.context = this;
@@ -421,14 +429,6 @@ void AudioThread::terminate() {
terminated = true;
AudioThreadCommand endCond; // push an empty input to bump the queue
cmdQueue.push(endCond);
while (!inputQueue->empty()) { // flush queue
AudioThreadInput *dummy;
inputQueue->pop(dummy);
if (dummy) {
dummy->decRefCount();
}
}
}
bool AudioThread::isActive() {