mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-14 08:01:46 -05:00
Fix Digital scope
This commit is contained in:
parent
0090838070
commit
0f5b891b20
@ -209,7 +209,7 @@ bool DemodulatorInstance::isActive() {
|
|||||||
void DemodulatorInstance::setActive(bool state) {
|
void DemodulatorInstance::setActive(bool state) {
|
||||||
if (active && !state) {
|
if (active && !state) {
|
||||||
#if ENABLE_DIGITAL_LAB
|
#if ENABLE_DIGITAL_LAB
|
||||||
if (activeOutput && !isTerminated()) {
|
if (activeOutput) {
|
||||||
activeOutput->Hide();
|
activeOutput->Hide();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -183,7 +183,7 @@ void DemodulatorThread::run() {
|
|||||||
localAudioVisOutputQueue = audioVisOutputQueue;
|
localAudioVisOutputQueue = audioVisOutputQueue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ati && localAudioVisOutputQueue != nullptr && localAudioVisOutputQueue->empty()) {
|
if ((ati || modemDigital) && localAudioVisOutputQueue != nullptr && localAudioVisOutputQueue->empty()) {
|
||||||
AudioThreadInput *ati_vis = new AudioThreadInput;
|
AudioThreadInput *ati_vis = new AudioThreadInput;
|
||||||
|
|
||||||
ati_vis->sampleRate = inp->sampleRate;
|
ati_vis->sampleRate = inp->sampleRate;
|
||||||
@ -191,6 +191,10 @@ void DemodulatorThread::run() {
|
|||||||
|
|
||||||
size_t num_vis = DEMOD_VIS_SIZE;
|
size_t num_vis = DEMOD_VIS_SIZE;
|
||||||
if (modemDigital) {
|
if (modemDigital) {
|
||||||
|
if (ati) { // TODO: handle digital modems with audio output
|
||||||
|
ati->setRefCount(0);
|
||||||
|
ati = nullptr;
|
||||||
|
}
|
||||||
ati_vis->data.resize(inputData->size());
|
ati_vis->data.resize(inputData->size());
|
||||||
ati_vis->channels = 2;
|
ati_vis->channels = 2;
|
||||||
for (int i = 0, iMax = inputData->size() / 2; i < iMax; i++) {
|
for (int i = 0, iMax = inputData->size() / 2; i < iMax; i++) {
|
||||||
|
@ -128,17 +128,18 @@ void ScopeCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
|
|||||||
|
|
||||||
glViewport(0, 0, ClientSize.x, ClientSize.y);
|
glViewport(0, 0, ClientSize.x, ClientSize.y);
|
||||||
|
|
||||||
if (scopePanel.getMode() == ScopePanel::SCOPE_MODE_XY && !spectrumVisible()) {
|
// TODO: find out why frontbuffer drawing has stopped working in wx 3.1.0?
|
||||||
glDrawBuffer(GL_FRONT);
|
// if (scopePanel.getMode() == ScopePanel::SCOPE_MODE_XY && !spectrumVisible()) {
|
||||||
glContext->DrawBegin(false);
|
// glDrawBuffer(GL_FRONT);
|
||||||
} else {
|
// glContext->DrawBegin(false);
|
||||||
glDrawBuffer(GL_BACK);
|
// } else {
|
||||||
|
// glDrawBuffer(GL_BACK);
|
||||||
glContext->DrawBegin();
|
glContext->DrawBegin();
|
||||||
|
|
||||||
bgPanel.setFillColor(ThemeMgr::mgr.currentTheme->scopeBackground * 3.0, RGBA4f(0,0,0,1));
|
bgPanel.setFillColor(ThemeMgr::mgr.currentTheme->scopeBackground * 3.0, RGBA4f(0,0,0,1));
|
||||||
bgPanel.calcTransform(CubicVR::mat4::identity());
|
bgPanel.calcTransform(CubicVR::mat4::identity());
|
||||||
bgPanel.draw();
|
bgPanel.draw();
|
||||||
}
|
// }
|
||||||
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
glMatrixMode(GL_PROJECTION);
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
@ -216,9 +217,9 @@ void ScopeCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
|
|||||||
glContext->DrawTunerTitles(ppmMode);
|
glContext->DrawTunerTitles(ppmMode);
|
||||||
glContext->DrawEnd();
|
glContext->DrawEnd();
|
||||||
|
|
||||||
if (scopePanel.getMode() != ScopePanel::SCOPE_MODE_XY || spectrumVisible()) {
|
// if (scopePanel.getMode() != ScopePanel::SCOPE_MODE_XY || spectrumVisible()) {
|
||||||
SwapBuffers();
|
SwapBuffers();
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user