Index: Source/modules/webaudio/RealtimeAnalyser.cpp |
diff --git a/Source/modules/webaudio/RealtimeAnalyser.cpp b/Source/modules/webaudio/RealtimeAnalyser.cpp |
index 24d7b729cabe902441ddda2c9099e0677199e03f..d7f671224a0b6512d22c7c771c487d7a526b1e73 100644 |
--- a/Source/modules/webaudio/RealtimeAnalyser.cpp |
+++ b/Source/modules/webaudio/RealtimeAnalyser.cpp |
@@ -138,7 +138,7 @@ void applyWindow(float* p, size_t n) |
for (unsigned i = 0; i < n; ++i) { |
double x = static_cast<double>(i) / static_cast<double>(n); |
- double window = a0 - a1 * cos(2 * piDouble * x) + a2 * cos(4 * piDouble * x); |
+ double window = a0 - a1 * cos(twoPiDouble * x) + a2 * cos(twoPiDouble * 2.0 * x); |
p[i] *= float(window); |
} |
} |