summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/audio/EqualPowerPanner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/audio/EqualPowerPanner.cpp')
-rw-r--r--WebCore/platform/audio/EqualPowerPanner.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/WebCore/platform/audio/EqualPowerPanner.cpp b/WebCore/platform/audio/EqualPowerPanner.cpp
index 2e4e10f..002b7c6 100644
--- a/WebCore/platform/audio/EqualPowerPanner.cpp
+++ b/WebCore/platform/audio/EqualPowerPanner.cpp
@@ -30,7 +30,7 @@
#include "AudioBus.h"
#include "AudioUtilities.h"
-#include <math.h>
+#include <wtf/MathExtras.h>
// Use a 50ms smoothing / de-zippering time-constant.
const double SmoothingTimeConstant = 0.050;
@@ -76,7 +76,7 @@ void EqualPowerPanner::pan(double azimuth, double /*elevation*/, AudioBus* input
else
desiredPanPosition = (azimuth + 30.0) / 60.0;
- double desiredGainL = 0.5 * cos(M_PI * desiredPanPosition) + 0.5;
+ double desiredGainL = 0.5 * cos(piDouble * desiredPanPosition) + 0.5;
double desiredGainR = sqrt(1.0 - desiredGainL*desiredGainL);
// Don't de-zipper on first render call.