diff --git a/NEWS b/NEWS index 5df053b6..d783b342 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,7 @@ ncmpcpp-0.7 (????-??-??) * Visualizer has now support for multiple colors (visualizer_color configuration variable takes the list of colors to be used). * Visualizer has now support for two more modes: sound wave filled and sound ellipse. +* Visualizer's spectrum mode now scales better along with window's width. * It is now possible to abort the current action using Ctrl-C or Ctrl-G in prompt mode. As a result, empty value is no longer a special value that aborts most of the actions. * Directories and playlists in browser can now be sorted by modification time. * ~ is now expanded to home directory in mpd_host configuration variable. diff --git a/src/visualizer.cpp b/src/visualizer.cpp index 283737fc..6d722d33 100644 --- a/src/visualizer.cpp +++ b/src/visualizer.cpp @@ -418,7 +418,7 @@ void Visualizer::DrawFrequencySpectrum(int16_t *buf, ssize_t samples, size_t y_o for (int j = 0; j < bins_per_bar; ++j) bar_height += m_freq_magnitudes[x*bins_per_bar+j]; // buff higher frequencies - bar_height *= log2(2 + x); + bar_height *= log2(2 + x) * 100.0/win_width; // moderately normalize the heights bar_height = pow(bar_height, 0.5);