mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-07-27 04:24:13 -04:00
Trying.. still one stuck in the queue on delete..
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user