Removed the static declaration from the coeff1 variable in the Hamming window derivative calculation. This coefficient depends on NumSamples, so cannot be static.

(cherry picked from commit 735af2eaa6f9085affa1a86c4ab6c92e2883b5f5)
This commit is contained in:
witwald
2025-04-16 16:56:02 +10:00
committed by Avery King
parent ecbb09689a
commit e8b9ea1b81

View File

@@ -590,7 +590,8 @@ void DerivativeOfWindowFunc(int whichFunction, size_t NumSamples, bool extraSamp
// Hamming
// There are deltas at the ends
const double multiplier = 2 * M_PI / NumSamples;
static const double coeff0 = 0.54, coeff1 = -0.46 * multiplier;
static const double coeff0 = 0.54;
const double coeff1 = -0.46 * multiplier;
// TODO This code should be more explicit about the precision it intends.
// For now we get C4305 warnings, truncation from 'const double' to 'float'
in[0] *= coeff0;