Improved performance of DC correction

This commit is contained in:
Ryzerth
2021-07-28 02:18:54 +02:00
parent b9e35e6558
commit 8290284586
5 changed files with 49 additions and 11 deletions

View File

@ -108,7 +108,7 @@ namespace displaymenu {
ImGui::SameLine();
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::InputInt("##sdrpp_fft_rate", &fftRate, 1, 10)) {
std::clamp<int>(fftRate, 1, 200);
fftRate = std::max<int>(1, fftRate);
sigpath::signalPath.setFFTRate(fftRate);
core::configManager.acquire();
core::configManager.conf["fftRate"] = fftRate;

View File

@ -362,7 +362,7 @@ namespace ImGui {
// If the mouse wheel is moved on the frequency scale
if (mouseWheel != 0 && mouseInFreq) {
viewOffset -= (double)mouseWheel * viewBandwidth / 20.0;
viewOffset -= (double)mouseWheel * viewBandwidth / 20.0;
if (viewOffset + (viewBandwidth / 2.0) > wholeBandwidth / 2.0) {
double freqOffset = (viewOffset + (viewBandwidth / 2.0)) - (wholeBandwidth / 2.0);