mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:37:35 +00:00
SoundPlayer: Convert to double before calculating
freq_bin was converted to double after it was calculated, so there was a much higher probability it could be 0 instead of some comma number, which meant that the bars always stayed on top.
This commit is contained in:
parent
43c37ae701
commit
1814f66c63
1 changed files with 1 additions and 1 deletions
|
@ -28,7 +28,7 @@ void BarsVisualizationWidget::paint_event(GUI::PaintEvent& event)
|
|||
fft(m_sample_buffer, false);
|
||||
double max = AK::sqrt(m_sample_count * 2.);
|
||||
|
||||
double freq_bin = m_samplerate / m_sample_count;
|
||||
double freq_bin = m_samplerate / (double)m_sample_count;
|
||||
|
||||
constexpr int group_count = 60;
|
||||
Vector<double, group_count> groups;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue