This commit is contained in:
Charles J. Cliffe 2015-09-10 23:42:22 -04:00
parent eec1d7936f
commit aa5a162888
4 changed files with 5 additions and 39 deletions

View File

@ -66,7 +66,7 @@ bool CubicSDR::OnInit() {
pipeSpectrumIQVisualData->set_max_num_items(1);
pipeWaterfallIQVisualData = new DemodulatorThreadInputQueue();
pipeWaterfallIQVisualData->set_max_num_items(DEFAULT_WATERFALL_LPS);
pipeWaterfallIQVisualData->set_max_num_items(128);
spectrumDistributor.attachOutput(pipeDemodIQVisualData);
spectrumDistributor.attachOutput(pipeSpectrumIQVisualData);

View File

@ -102,10 +102,6 @@ void ScopeCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
wxPaintDC dc(this);
const wxSize ClientSize = GetClientSize();
//#ifdef __APPLE__
// glFinish();
//#endif
while (!inputData.empty()) {
ScopeRenderData *avData;
inputData.pop(avData);

View File

@ -45,10 +45,6 @@ SpectrumCanvas::~SpectrumCanvas() {
void SpectrumCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
wxPaintDC dc(this);
const wxSize ClientSize = GetClientSize();
//#ifdef __APPLE__
// glFinish();
//#endif
if (!visualDataQueue.empty()) {
SpectrumVisualData *vData;

View File

@ -78,21 +78,7 @@ void WaterfallCanvas::processInputQueue() {
}
glContext->SetCurrent(*this);
bool processed = false;
// int numVis = visualDataQueue.size();
gTimer.update();
// if (linesPerSecond >= 30) {
// if ((visualDataQueue.size() < (linesPerSecond/5)) && !preBuf) {
// return;
// } else {
// if (visualDataQueue.size() < (linesPerSecond/10)) {
// preBuf = false;
// } else {
// preBuf = true;
// }
// }
// }
double targetVis = 1.0 / (double)linesPerSecond;
lpsIndex += gTimer.lastUpdateSeconds();
@ -109,7 +95,6 @@ void WaterfallCanvas::processInputQueue() {
waterfallPanel.setPoints(vData->spectrum_points);
waterfallPanel.step();
vData->decRefCount();
processed = true;
}
lpsIndex-=targetVis;
} else {
@ -118,21 +103,11 @@ void WaterfallCanvas::processInputQueue() {
}
tex_update.unlock();
}
}
if (processed) {
// Refresh();
}
}
}}
void WaterfallCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
// wxClientDC dc(this);
// testTimer.timerTestFunc();
wxPaintDC dc(this);
//#ifdef __APPLE__
// glFinish();
//#endif
processInputQueue();
const wxSize ClientSize = GetClientSize();
@ -318,7 +293,6 @@ void WaterfallCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
glContext->EndDraw();
// glFlush();
SwapBuffers();
}
@ -436,11 +410,11 @@ void WaterfallCanvas::OnKeyDown(wxKeyEvent& event) {
}
void WaterfallCanvas::OnIdle(wxIdleEvent &event) {
// Refresh();
// processInputQueue();
Refresh();
event.RequestMore();
// event.Skip();
if (visualDataQueue.size() > linesPerSecond) {
processInputQueue();
}
}
void WaterfallCanvas::OnMouseMoved(wxMouseEvent& event) {