aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/mixer.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-09-23 23:03:59 -0700
committerChris Robinson <[email protected]>2011-09-23 23:03:59 -0700
commitb4f9f894806fe5fa9adb1ebb481392838cc81e2e (patch)
treebc19f4ceb87a32dad496adb59640e214e1b1e44f /Alc/mixer.c
parenta9b6b284c0ab4c098510198c78b759bf0eac483e (diff)
Use float types for the resamplers instead of double
Diffstat (limited to 'Alc/mixer.c')
-rw-r--r--Alc/mixer.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/Alc/mixer.c b/Alc/mixer.c
index eb7e433f..2c7af645 100644
--- a/Alc/mixer.c
+++ b/Alc/mixer.c
@@ -37,29 +37,29 @@
#include "bs2b.h"
-static __inline ALdouble point32(const ALfloat *vals, ALint step, ALint frac)
+static __inline ALfloat point32(const ALfloat *vals, ALint step, ALint frac)
{ return vals[0]; (void)step; (void)frac; }
-static __inline ALdouble lerp32(const ALfloat *vals, ALint step, ALint frac)
-{ return lerp(vals[0], vals[step], frac * (1.0/FRACTIONONE)); }
-static __inline ALdouble cubic32(const ALfloat *vals, ALint step, ALint frac)
+static __inline ALfloat lerp32(const ALfloat *vals, ALint step, ALint frac)
+{ return lerp(vals[0], vals[step], frac * (1.0f/FRACTIONONE)); }
+static __inline ALfloat cubic32(const ALfloat *vals, ALint step, ALint frac)
{ return cubic(vals[-step], vals[0], vals[step], vals[step+step],
- frac * (1.0/FRACTIONONE)); }
+ frac * (1.0f/FRACTIONONE)); }
-static __inline ALdouble point16(const ALshort *vals, ALint step, ALint frac)
-{ return vals[0] * (1.0/32767.0); (void)step; (void)frac; }
-static __inline ALdouble lerp16(const ALshort *vals, ALint step, ALint frac)
-{ return lerp(vals[0], vals[step], frac * (1.0/FRACTIONONE)) * (1.0/32767.0); }
-static __inline ALdouble cubic16(const ALshort *vals, ALint step, ALint frac)
+static __inline ALfloat point16(const ALshort *vals, ALint step, ALint frac)
+{ return vals[0] * (1.0f/32767.0f); (void)step; (void)frac; }
+static __inline ALfloat lerp16(const ALshort *vals, ALint step, ALint frac)
+{ return lerp(vals[0], vals[step], frac * (1.0f/FRACTIONONE)) * (1.0f/32767.0f); }
+static __inline ALfloat cubic16(const ALshort *vals, ALint step, ALint frac)
{ return cubic(vals[-step], vals[0], vals[step], vals[step+step],
- frac * (1.0/FRACTIONONE)) * (1.0/32767.0); }
+ frac * (1.0f/FRACTIONONE)) * (1.0f/32767.0f); }
-static __inline ALdouble point8(const ALbyte *vals, ALint step, ALint frac)
-{ return vals[0] * (1.0/127.0); (void)step; (void)frac; }
-static __inline ALdouble lerp8(const ALbyte *vals, ALint step, ALint frac)
-{ return lerp(vals[0], vals[step], frac * (1.0/FRACTIONONE)) * (1.0/127.0); }
-static __inline ALdouble cubic8(const ALbyte *vals, ALint step, ALint frac)
+static __inline ALfloat point8(const ALbyte *vals, ALint step, ALint frac)
+{ return vals[0] * (1.0f/127.0f); (void)step; (void)frac; }
+static __inline ALfloat lerp8(const ALbyte *vals, ALint step, ALint frac)
+{ return lerp(vals[0], vals[step], frac * (1.0f/FRACTIONONE)) * (1.0f/127.0f); }
+static __inline ALfloat cubic8(const ALbyte *vals, ALint step, ALint frac)
{ return cubic(vals[-step], vals[0], vals[step], vals[step+step],
- frac * (1.0/FRACTIONONE)) * (1.0/127.0); }
+ frac * (1.0f/FRACTIONONE)) * (1.0f/127.0f); }
#ifdef __GNUC__
#define LIKELY(x) __builtin_expect(!!(x), 1)