From 5c9f673e38c8995867aedae3d90ba6fea52bd783 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Tue, 9 Feb 2016 15:05:19 -0800 Subject: [PATCH] fix for missing M_PI --- libraries/audio/src/AudioHRTF.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/audio/src/AudioHRTF.cpp b/libraries/audio/src/AudioHRTF.cpp index f788dd816a..a7bae292bc 100644 --- a/libraries/audio/src/AudioHRTF.cpp +++ b/libraries/audio/src/AudioHRTF.cpp @@ -59,6 +59,8 @@ static const float crossfadeTable[HRTF_BLOCK] = { 0.0024846123f, 0.0019026510f, 0.0013981014f, 0.0009710421f, 0.0006215394f, 0.0003496476f, 0.0001554090f, 0.0000388538f, }; +static const float TWOPI = 6.283185307f; + // // on x86 architecture, assume that SSE2 is present // @@ -509,7 +511,7 @@ static void setAzimuthAndGain(float firCoef[4][HRTF_TAPS], float bqCoef[5][4], i int index, float azimuth, float gain, int channel) { // convert from radians to table units - azimuth *= HRTF_AZIMUTHS / (2.0f * M_PI); + azimuth *= HRTF_AZIMUTHS / TWOPI; // convert from degrees to table units // azimuth *= HRTF_AZIMUTHS / 360.0f;