diff --git a/src/effects/Equalization.cpp b/src/effects/Equalization.cpp index 428063d12..3c189fe27 100644 --- a/src/effects/Equalization.cpp +++ b/src/effects/Equalization.cpp @@ -831,11 +831,21 @@ void EqualizationPanel::OnPaint(wxPaintEvent & WXUNUSED(event)) freq = lin ? step*i : pow(10., loLog + i*step); //Hz if( ( lin ? step : (pow(10., loLog + (i+1)*step)-freq) ) < delta) { //not enough resolution in FFT - freq = M_PI*freq/mHiFreq; //radians, normalized + // set up for calculating cos using recurrance - faster than calculating it directly each time + double theta = M_PI*freq/mHiFreq; //radians, normalized + double wtemp = sin(0.5 * theta); + double wpr = -2.0 * wtemp * wtemp; + double wpi = -1.0 * sin(theta); + double wr = cos(theta*halfM); + double wi = sin(theta*halfM); + yF = 0.; for(int j=0;j