Fix wrong accumulator type - this fix makes the detector a little more sensitive, which is not necessarily good, but the previous accidental behaviour exaggerated the difference in results between float and double precision ffts

This commit is contained in:
Chris Cannam
2021-03-09 17:22:41 +00:00
parent e79658b04f
commit b463cf5565

View File

@@ -58,14 +58,14 @@ HighFrequencyAudioCurve::processFloat(const float *R__ mag, int)
double
HighFrequencyAudioCurve::processDouble(const double *R__ mag, int)
{
float result = 0.0;
double result = 0.0;
const int sz = m_lastPerceivedBin;
for (int n = 0; n <= sz; ++n) {
result = result + mag[n] * n;
}
return result;
}