mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-15 16:41:54 -05:00
BLOCKING_QUEUE: don't forget to cleanup if we try_push()
This commit is contained in:
parent
65c1722bca
commit
3ed65eff8e
@ -298,13 +298,17 @@ void DemodulatorThread::run() {
|
|||||||
ati_vis->type = 0;
|
ati_vis->type = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!localAudioVisOutputQueue->try_push(ati_vis)) {
|
||||||
//non-blocking push for audio-out
|
//non-blocking push for audio-out
|
||||||
localAudioVisOutputQueue->try_push(ati_vis);
|
ati_vis->setRefCount(0);
|
||||||
|
std::cout << "DemodulatorThread::run() cannot push ati_vis into localAudioVisOutputQueue, is full !" << std::endl;
|
||||||
|
std::this_thread::yield();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ati != nullptr) {
|
if (ati != nullptr) {
|
||||||
if (!muted.load() && (!wxGetApp().getSoloMode() || (demodInstance == wxGetApp().getDemodMgr().getLastActiveDemodulator()))) {
|
if (!muted.load() && (!wxGetApp().getSoloMode() || (demodInstance == wxGetApp().getDemodMgr().getLastActiveDemodulator()))) {
|
||||||
//non-blocking push for audio-out
|
|
||||||
audioOutputQueue->push(ati);
|
audioOutputQueue->push(ati);
|
||||||
} else {
|
} else {
|
||||||
ati->setRefCount(0);
|
ati->setRefCount(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user