Visual queue smoothing tweak

This commit is contained in:
Charles J. Cliffe 2015-09-09 23:46:05 -04:00
parent a1bf5b839e
commit 43b30367d9
2 changed files with 15 additions and 6 deletions

View File

@ -16,7 +16,7 @@ int FFTDataDistributor::getLinesPerSecond() {
}
void FFTDataDistributor::process() {
if (!input->empty()) {
while (!input->empty()) {
if (!isAnyOutputEmpty()) {
return;
}
@ -33,7 +33,7 @@ void FFTDataDistributor::process() {
}
inp->decRefCount();
} else {
return;
continue;
}
// number of seconds contained in input

View File

@ -113,7 +113,7 @@ void WaterfallCanvas::processInputQueue() {
}
}
if (processed) {
// Refresh();
Refresh();
}
}
@ -427,11 +427,11 @@ void WaterfallCanvas::OnKeyDown(wxKeyEvent& event) {
}
void WaterfallCanvas::OnIdle(wxIdleEvent &event) {
Refresh();
// Refresh();
// processInputQueue();
// Refresh();
event.RequestMore();
// event.Skip();
// event.RequestMore();
event.Skip();
}
void WaterfallCanvas::OnMouseMoved(wxMouseEvent& event) {
@ -821,6 +821,15 @@ void WaterfallCanvas::updateCenterFrequency(long long freq) {
void WaterfallCanvas::setLinesPerSecond(int lps) {
linesPerSecond = lps;
while (!visualDataQueue.empty()) {
SpectrumVisualData *vData;
visualDataQueue.pop(vData);
if (vData) {
vData->decRefCount();
}
}
}