diff options
author | Andrzej Rybczak <andrzej@rybczak.net> | 2020-12-23 16:10:29 +0100 |
---|---|---|
committer | Andrzej Rybczak <andrzej@rybczak.net> | 2020-12-23 16:10:45 +0100 |
commit | 75f1ffaf1ad36c0db22c402df1969f09741926b0 (patch) | |
tree | b3401ff67c3d4869657b4ad69396ac68c5522cda | |
parent | 901542ee8eb9ba08459dc47024760dee498ed47b (diff) |
Revert change from previous commit
-rw-r--r-- | src/screens/visualizer.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/screens/visualizer.cpp b/src/screens/visualizer.cpp index 937f1ceb..d027d548 100644 --- a/src/screens/visualizer.cpp +++ b/src/screens/visualizer.cpp @@ -447,7 +447,11 @@ void Visualizer::DrawFrequencySpectrum(const int16_t *buf, ssize_t samples, size m_bar_heights.clear(); const size_t win_width = w.getWidth(); - for (size_t x = 0, cur_bin = 0; x < win_width; ++x) + + size_t cur_bin = 0; + while (cur_bin < m_fftw_results && Bin2Hz(cur_bin) < m_dft_logspace[0]) + ++cur_bin; + for (size_t x = 0; x < win_width; ++x) { double bar_height = 0; |