Skip to content

Commit

Permalink
Fix Blackman-Harris window formula (#4895)
Browse files Browse the repository at this point in the history
Adds missing parentheses
  • Loading branch information
he29-net authored and PhysSong committed Mar 17, 2019
1 parent 3aeacca commit 0c3db10
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins/Eq/EqSpectrumView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ EqAnalyser::EqAnalyser() :
const float a2 = 0.14128;
const float a3 = 0.01168;

for(int i = 0; i < FFT_BUFFER_SIZE; i++)
for (int i = 0; i < FFT_BUFFER_SIZE; i++)
{
m_fftWindow[i] = ( a0 - a1 * cosf( 2 * F_PI * i / (float)FFT_BUFFER_SIZE - 1 )
+ a2 * cosf( 4 * F_PI * i / (float)FFT_BUFFER_SIZE-1)
- a3 * cos( 6 * F_PI * i / (float)FFT_BUFFER_SIZE - 1.0 ));
m_fftWindow[i] = (a0 - a1 * cos(2 * F_PI * i / ((float)FFT_BUFFER_SIZE - 1.0))
+ a2 * cos(4 * F_PI * i / ((float)FFT_BUFFER_SIZE - 1.0))
- a3 * cos(6 * F_PI * i / ((float)FFT_BUFFER_SIZE - 1.0)));
}
clear();
}
Expand Down

0 comments on commit 0c3db10

Please sign in to comment.