From 2a339d8ea3deb7b8ef28224ada00c1180bc260e3 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 19 Nov 2007 12:44:54 +0000 Subject: Don't use M_PI, rather use our very own PI constant svn-id: r29567 --- sound/softsynth/pcspk.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sound/softsynth/pcspk.cpp b/sound/softsynth/pcspk.cpp index 18bd1ceb5f..dea3eac549 100644 --- a/sound/softsynth/pcspk.cpp +++ b/sound/softsynth/pcspk.cpp @@ -25,10 +25,6 @@ #include "sound/softsynth/pcspk.h" -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif - namespace Audio { const PCSpeaker::generatorFunc PCSpeaker::generateWave[] = @@ -108,7 +104,7 @@ int8 PCSpeaker::generateSine(uint32 x, uint32 oscLength) { return 0; // TODO: Maybe using a look-up-table would be better? - return CLIP((int16) (128 * sin(2.0 * M_PI * x / oscLength)), -128, 127); + return CLIP((int16) (128 * sin(2.0 * PI * x / oscLength)), -128, 127); } int8 PCSpeaker::generateSaw(uint32 x, uint32 oscLength) { -- cgit v1.2.3