diff --git a/src/demod/DemodulatorInstance.cpp b/src/demod/DemodulatorInstance.cpp index 407255e..c3a22ee 100644 --- a/src/demod/DemodulatorInstance.cpp +++ b/src/demod/DemodulatorInstance.cpp @@ -209,7 +209,7 @@ bool DemodulatorInstance::isActive() { void DemodulatorInstance::setActive(bool state) { if (active && !state) { #if ENABLE_DIGITAL_LAB - if (activeOutput && !isTerminated()) { + if (activeOutput) { activeOutput->Hide(); } #endif diff --git a/src/demod/DemodulatorThread.cpp b/src/demod/DemodulatorThread.cpp index 2911f69..fcde477 100644 --- a/src/demod/DemodulatorThread.cpp +++ b/src/demod/DemodulatorThread.cpp @@ -183,7 +183,7 @@ void DemodulatorThread::run() { localAudioVisOutputQueue = audioVisOutputQueue; } - if (ati && localAudioVisOutputQueue != nullptr && localAudioVisOutputQueue->empty()) { + if ((ati || modemDigital) && localAudioVisOutputQueue != nullptr && localAudioVisOutputQueue->empty()) { AudioThreadInput *ati_vis = new AudioThreadInput; ati_vis->sampleRate = inp->sampleRate; @@ -191,6 +191,10 @@ void DemodulatorThread::run() { size_t num_vis = DEMOD_VIS_SIZE; if (modemDigital) { + if (ati) { // TODO: handle digital modems with audio output + ati->setRefCount(0); + ati = nullptr; + } ati_vis->data.resize(inputData->size()); ati_vis->channels = 2; for (int i = 0, iMax = inputData->size() / 2; i < iMax; i++) { diff --git a/src/visual/ScopeCanvas.cpp b/src/visual/ScopeCanvas.cpp index b289703..83e04e7 100644 --- a/src/visual/ScopeCanvas.cpp +++ b/src/visual/ScopeCanvas.cpp @@ -128,17 +128,18 @@ void ScopeCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) { glViewport(0, 0, ClientSize.x, ClientSize.y); - if (scopePanel.getMode() == ScopePanel::SCOPE_MODE_XY && !spectrumVisible()) { - glDrawBuffer(GL_FRONT); - glContext->DrawBegin(false); - } else { - glDrawBuffer(GL_BACK); + // TODO: find out why frontbuffer drawing has stopped working in wx 3.1.0? +// if (scopePanel.getMode() == ScopePanel::SCOPE_MODE_XY && !spectrumVisible()) { +// glDrawBuffer(GL_FRONT); +// glContext->DrawBegin(false); +// } else { +// glDrawBuffer(GL_BACK); glContext->DrawBegin(); - + bgPanel.setFillColor(ThemeMgr::mgr.currentTheme->scopeBackground * 3.0, RGBA4f(0,0,0,1)); bgPanel.calcTransform(CubicVR::mat4::identity()); bgPanel.draw(); - } +// } glMatrixMode(GL_PROJECTION); glLoadIdentity(); @@ -216,9 +217,9 @@ void ScopeCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) { glContext->DrawTunerTitles(ppmMode); glContext->DrawEnd(); - if (scopePanel.getMode() != ScopePanel::SCOPE_MODE_XY || spectrumVisible()) { +// if (scopePanel.getMode() != ScopePanel::SCOPE_MODE_XY || spectrumVisible()) { SwapBuffers(); - } +// } }