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

View File

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