aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/ALu.c4
-rw-r--r--Alc/mixer.c34
-rw-r--r--OpenAL32/Include/alu.h14
3 files changed, 26 insertions, 26 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 6c474f23..0697e943 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -584,8 +584,8 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
if(Angle >= InnerAngle && Angle <= OuterAngle)
{
ALfloat scale = (Angle-InnerAngle) / (OuterAngle-InnerAngle);
- ConeVolume = lerp(1.0, ALSource->flOuterGain, scale);
- ConeHF = lerp(1.0, ALSource->OuterGainHF, scale);
+ ConeVolume = lerp(1.0f, ALSource->flOuterGain, scale);
+ ConeHF = lerp(1.0f, ALSource->OuterGainHF, scale);
}
else if(Angle > OuterAngle)
{
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)
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index f041ffc5..b6924908 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -162,17 +162,17 @@ static __inline ALint clampi(ALint val, ALint min, ALint max)
{ return mini(max, maxi(min, val)); }
-static __inline ALdouble lerp(ALdouble val1, ALdouble val2, ALdouble mu)
+static __inline ALfloat lerp(ALfloat val1, ALfloat val2, ALfloat mu)
{
return val1 + (val2-val1)*mu;
}
-static __inline ALdouble cubic(ALdouble val0, ALdouble val1, ALdouble val2, ALdouble val3, ALdouble mu)
+static __inline ALfloat cubic(ALfloat val0, ALfloat val1, ALfloat val2, ALfloat val3, ALfloat mu)
{
- ALdouble mu2 = mu*mu;
- ALdouble a0 = -0.5*val0 + 1.5*val1 + -1.5*val2 + 0.5*val3;
- ALdouble a1 = val0 + -2.5*val1 + 2.0*val2 + -0.5*val3;
- ALdouble a2 = -0.5*val0 + 0.5*val2;
- ALdouble a3 = val1;
+ ALfloat mu2 = mu*mu;
+ ALfloat a0 = -0.5f*val0 + 1.5f*val1 + -1.5f*val2 + 0.5f*val3;
+ ALfloat a1 = val0 + -2.5f*val1 + 2.0f*val2 + -0.5f*val3;
+ ALfloat a2 = -0.5f*val0 + 0.5f*val2;
+ ALfloat a3 = val1;
return a0*mu*mu2 + a1*mu2 + a2*mu + a3;
}