mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2025-09-10 02:37:59 -04:00
BLOCKING_QUEUE: let audio-out try_push() too, else it often blocks evrything while in debugger...
This commit is contained in:
parent
8dfb8ea3f1
commit
051ebec49f
@ -299,7 +299,7 @@ void DemodulatorThread::run() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!localAudioVisOutputQueue->try_push(ati_vis)) {
|
if (!localAudioVisOutputQueue->try_push(ati_vis)) {
|
||||||
//non-blocking push for audio-out
|
//non-blocking push needed for audio vis out
|
||||||
ati_vis->setRefCount(0);
|
ati_vis->setRefCount(0);
|
||||||
std::cout << "DemodulatorThread::run() cannot push ati_vis into localAudioVisOutputQueue, is full !" << std::endl;
|
std::cout << "DemodulatorThread::run() cannot push ati_vis into localAudioVisOutputQueue, is full !" << std::endl;
|
||||||
std::this_thread::yield();
|
std::this_thread::yield();
|
||||||
@ -308,8 +308,12 @@ void DemodulatorThread::run() {
|
|||||||
|
|
||||||
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 needed for audio out
|
||||||
audioOutputQueue->push(ati);
|
if (!audioOutputQueue->try_push(ati)) {
|
||||||
|
ati->decRefCount();
|
||||||
|
std::cout << "DemodulatorThread::run() cannot push ati into audioOutputQueue, is full !" << std::endl;
|
||||||
|
std::this_thread::yield();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
ati->setRefCount(0);
|
ati->setRefCount(0);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user