aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-05-16 23:26:39 -0700
committerChris Robinson <[email protected]>2009-05-16 23:26:39 -0700
commit7e8501123a092a19b8153f7fdeecef2e0c5f0aa2 (patch)
treeda5bd197753be2b257fa263707d144844622e707 /Alc
parentc447eeb2c77d91d11750270aaed36a2354069095 (diff)
Set some common macros in alu.h
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALu.c41
-rw-r--r--Alc/alcEcho.c7
-rw-r--r--Alc/alcReverb.c19
3 files changed, 2 insertions, 65 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 78c936cc..602b29f0 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -40,15 +40,6 @@
#include "bs2b.h"
#include "alReverb.h"
-#if defined (HAVE_FLOAT_H)
-#include <float.h>
-#endif
-
-#ifndef M_PI
-#define M_PI 3.14159265358979323846 /* pi */
-#define M_PI_2 1.57079632679489661923 /* pi/2 */
-#endif
-
#if defined(HAVE_STDINT_H)
#include <stdint.h>
typedef int64_t ALint64;
@@ -60,38 +51,6 @@ typedef long ALint64;
typedef long long ALint64;
#endif
-#ifdef HAVE_SQRTF
-#define aluSqrt(x) ((ALfloat)sqrtf((float)(x)))
-#else
-#define aluSqrt(x) ((ALfloat)sqrt((double)(x)))
-#endif
-
-#ifdef HAVE_ACOSF
-#define aluAcos(x) ((ALfloat)acosf((float)(x)))
-#else
-#define aluAcos(x) ((ALfloat)acos((double)(x)))
-#endif
-
-#ifdef HAVE_ATANF
-#define aluAtan(x) ((ALfloat)atanf((float)(x)))
-#else
-#define aluAtan(x) ((ALfloat)atan((double)(x)))
-#endif
-
-#ifdef HAVE_FABSF
-#define aluFabs(x) ((ALfloat)fabsf((float)(x)))
-#else
-#define aluFabs(x) ((ALfloat)fabs((double)(x)))
-#endif
-
-// fixes for mingw32.
-#if defined(max) && !defined(__max)
-#define __max max
-#endif
-#if defined(min) && !defined(__min)
-#define __min min
-#endif
-
#define FRACTIONBITS 14
#define FRACTIONMASK ((1L<<FRACTIONBITS)-1)
#define MAX_PITCH 65536
diff --git a/Alc/alcEcho.c b/Alc/alcEcho.c
index f6606bfa..e518fb21 100644
--- a/Alc/alcEcho.c
+++ b/Alc/alcEcho.c
@@ -27,12 +27,7 @@
#include "alFilter.h"
#include "alAuxEffectSlot.h"
#include "alEcho.h"
-
-#ifdef HAVE_SQRTF
-#define aluSqrt(x) ((ALfloat)sqrtf((float)(x)))
-#else
-#define aluSqrt(x) ((ALfloat)sqrt((double)(x)))
-#endif
+#include "alu.h"
struct ALechoState {
ALfloat *SampleBuffer;
diff --git a/Alc/alcReverb.c b/Alc/alcReverb.c
index 91e60a8c..0516ab4f 100644
--- a/Alc/alcReverb.c
+++ b/Alc/alcReverb.c
@@ -29,24 +29,7 @@
#include "alAuxEffectSlot.h"
#include "alEffect.h"
#include "alReverb.h"
-
-#ifdef HAVE_SQRTF
-#define aluSqrt(x) ((ALfloat)sqrtf((float)(x)))
-#else
-#define aluSqrt(x) ((ALfloat)sqrt((double)(x)))
-#endif
-
-// fixes for mingw32.
-#if defined(max) && !defined(__max)
-#define __max max
-#endif
-#if defined(min) && !defined(__min)
-#define __min min
-#endif
-
-#ifndef M_PI
-#define M_PI 3.14159265358979323846 /* pi */
-#endif
+#include "alu.h"
typedef struct DelayLine
{