aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include/alu.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-11-04 13:44:46 -0800
committerChris Robinson <[email protected]>2013-11-04 13:44:46 -0800
commitd3c70e63b4a42c92f8229f3c9e7f21a2048b6b9d (patch)
tree31b5ca98a42f4d1e51d0fd76bf7040a1c2e8da44 /OpenAL32/Include/alu.h
parent551f893ae910c2b1b72c0a22aeab1ede75d3e5ed (diff)
Use C99 inline in more places
Diffstat (limited to 'OpenAL32/Include/alu.h')
-rw-r--r--OpenAL32/Include/alu.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index 55b8edd1..075d5569 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -57,47 +57,47 @@ typedef ALvoid (*WetMixerFunc)(const struct SendParams *params,
#define FRACTIONMASK (FRACTIONONE-1)
-static inline ALfloat minf(ALfloat a, ALfloat b)
+inline ALfloat minf(ALfloat a, ALfloat b)
{ return ((a > b) ? b : a); }
-static inline ALfloat maxf(ALfloat a, ALfloat b)
+inline ALfloat maxf(ALfloat a, ALfloat b)
{ return ((a > b) ? a : b); }
-static inline ALfloat clampf(ALfloat val, ALfloat min, ALfloat max)
+inline ALfloat clampf(ALfloat val, ALfloat min, ALfloat max)
{ return minf(max, maxf(min, val)); }
-static inline ALuint minu(ALuint a, ALuint b)
+inline ALuint minu(ALuint a, ALuint b)
{ return ((a > b) ? b : a); }
-static inline ALuint maxu(ALuint a, ALuint b)
+inline ALuint maxu(ALuint a, ALuint b)
{ return ((a > b) ? a : b); }
-static inline ALuint clampu(ALuint val, ALuint min, ALuint max)
+inline ALuint clampu(ALuint val, ALuint min, ALuint max)
{ return minu(max, maxu(min, val)); }
-static inline ALint mini(ALint a, ALint b)
+inline ALint mini(ALint a, ALint b)
{ return ((a > b) ? b : a); }
-static inline ALint maxi(ALint a, ALint b)
+inline ALint maxi(ALint a, ALint b)
{ return ((a > b) ? a : b); }
-static inline ALint clampi(ALint val, ALint min, ALint max)
+inline ALint clampi(ALint val, ALint min, ALint max)
{ return mini(max, maxi(min, val)); }
-static inline ALint64 mini64(ALint64 a, ALint64 b)
+inline ALint64 mini64(ALint64 a, ALint64 b)
{ return ((a > b) ? b : a); }
-static inline ALint64 maxi64(ALint64 a, ALint64 b)
+inline ALint64 maxi64(ALint64 a, ALint64 b)
{ return ((a > b) ? a : b); }
-static inline ALint64 clampi64(ALint64 val, ALint64 min, ALint64 max)
+inline ALint64 clampi64(ALint64 val, ALint64 min, ALint64 max)
{ return mini64(max, maxi64(min, val)); }
-static inline ALuint64 minu64(ALuint64 a, ALuint64 b)
+inline ALuint64 minu64(ALuint64 a, ALuint64 b)
{ return ((a > b) ? b : a); }
-static inline ALuint64 maxu64(ALuint64 a, ALuint64 b)
+inline ALuint64 maxu64(ALuint64 a, ALuint64 b)
{ return ((a > b) ? a : b); }
-static inline ALuint64 clampu64(ALuint64 val, ALuint64 min, ALuint64 max)
+inline ALuint64 clampu64(ALuint64 val, ALuint64 min, ALuint64 max)
{ return minu64(max, maxu64(min, val)); }
-static inline ALfloat lerp(ALfloat val1, ALfloat val2, ALfloat mu)
+inline ALfloat lerp(ALfloat val1, ALfloat val2, ALfloat mu)
{
return val1 + (val2-val1)*mu;
}
-static inline ALfloat cubic(ALfloat val0, ALfloat val1, ALfloat val2, ALfloat val3, ALfloat mu)
+inline ALfloat cubic(ALfloat val0, ALfloat val1, ALfloat val2, ALfloat val3, ALfloat mu)
{
ALfloat mu2 = mu*mu;
ALfloat a0 = -0.5f*val0 + 1.5f*val1 + -1.5f*val2 + 0.5f*val3;
@@ -124,7 +124,7 @@ void ComputeAngleGains(const ALCdevice *device, ALfloat angle, ALfloat hwidth, A
*
* Helper to set the appropriate channels to the specified gain.
*/
-static inline void SetGains(const ALCdevice *device, ALfloat ingain, ALfloat gains[MaxChannels])
+inline void SetGains(const ALCdevice *device, ALfloat ingain, ALfloat gains[MaxChannels])
{
ComputeAngleGains(device, 0.0f, F_PI, ingain, gains);
}