diff options
author | Andrzej Rybczak <andrzej@rybczak.net> | 2020-12-14 18:15:47 +0100 |
---|---|---|
committer | Andrzej Rybczak <andrzej@rybczak.net> | 2020-12-14 18:15:47 +0100 |
commit | 970ebe63fd8071b78a2cfb8c19326fc68b2a0af2 (patch) | |
tree | 0ec76b249b4da1fc03373f0796f667b6df71d420 /src | |
parent | 27bd4bff5e2a3b4fd0691eac3edd4854f5c66149 (diff) |
Call InitVisualization() on resize
Diffstat (limited to 'src')
-rw-r--r-- | src/screens/visualizer.cpp | 7 | ||||
-rw-r--r-- | src/screens/visualizer.h | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/screens/visualizer.cpp b/src/screens/visualizer.cpp index ce0f3eca..aae1482b 100644 --- a/src/screens/visualizer.cpp +++ b/src/screens/visualizer.cpp @@ -80,7 +80,7 @@ Visualizer::Visualizer() #endif { ResetFD(); - SetVisualizationType(); + InitVisualization(); # ifdef HAVE_FFTW3_H m_fftw_results = DFT_TOTAL_SIZE/2+1; m_freq_magnitudes.resize(m_fftw_results); @@ -114,6 +114,7 @@ void Visualizer::resize() w.resize(width, MainHeight); w.moveTo(x_offset, MainStartY); hasToBeResized = 0; + InitVisualization(); # ifdef HAVE_FFTW3_H GenLogspace(); m_bar_heights.reserve(w.getWidth()); @@ -593,7 +594,7 @@ void Visualizer::GenLogspace() } #endif // HAVE_FFTW3_H -void Visualizer::SetVisualizationType() +void Visualizer::InitVisualization() { switch (Config.visualizer_type) { @@ -660,7 +661,7 @@ void Visualizer::ToggleVisualizationType() Config.visualizer_type = VisualizerType::Wave; break; } - SetVisualizationType(); + InitVisualization(); Statusbar::printf("Visualization type: %1%", Config.visualizer_type); } diff --git a/src/screens/visualizer.h b/src/screens/visualizer.h index 099b2080..d3b8de4f 100644 --- a/src/screens/visualizer.h +++ b/src/screens/visualizer.h @@ -77,7 +77,7 @@ private: double Interpolate(size_t, size_t); # endif // HAVE_FFTW3_H - void SetVisualizationType(); + void InitVisualization(); void (Visualizer::*draw)(const int16_t *, ssize_t, size_t, size_t); void (Visualizer::*drawStereo)(const int16_t *, const int16_t *, ssize_t, size_t); |