Skip to content

Commit f7f7f96

Browse files
committed
Fix upper bound of frequency band calculation.
The "+1" somehow disappeared at some point...
1 parent 36fb09c commit f7f7f96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/libprojectM/Audio/Loudness.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ auto Loudness::AverageRelative() const -> float
2929
void Loudness::SumBand(const std::array<float, SpectrumSamples>& spectrumSamples)
3030
{
3131
int start = SpectrumSamples * static_cast<int>(m_band) / 6;
32-
int end = SpectrumSamples * static_cast<int>(m_band) / 6;
32+
int end = SpectrumSamples * (static_cast<int>(m_band) + 1) / 6;
3333

3434
m_current = 0.0f;
3535
for (int sample = start; sample < end; sample++)

0 commit comments

Comments
 (0)