mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-05 00:41:17 -05:00
Visual queue smoothing tweak
This commit is contained in:
parent
a1bf5b839e
commit
43b30367d9
@ -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
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user