aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
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 /Alc
parent551f893ae910c2b1b72c0a22aeab1ede75d3e5ed (diff)
Use C99 inline in more places
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c4
-rw-r--r--Alc/ALu.c22
-rw-r--r--Alc/helpers.c4
-rw-r--r--Alc/panning.c2
4 files changed, 32 insertions, 0 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 0d1236d1..bb611a77 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1274,6 +1274,7 @@ const ALCchar *DevFmtChannelsString(enum DevFmtChannels chans)
return "(unknown channels)";
}
+extern inline ALuint FrameSizeFromDevFmt(enum DevFmtChannels chans, enum DevFmtType type);
ALuint BytesFromDevFmt(enum DevFmtType type)
{
switch(type)
@@ -1415,6 +1416,9 @@ void ALCdevice_Unlock(ALCdevice *device)
V0(device->Backend,unlock)();
}
+extern inline void LockContext(ALCcontext *context);
+extern inline void UnlockContext(ALCcontext *context);
+
/* SetDefaultWFXChannelOrder
*
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 5a86356c..ffa299b2 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -48,6 +48,28 @@ ALfloat ConeScale = 1.0f;
/* Localized Z scalar for mono sources */
ALfloat ZScale = 1.0f;
+extern inline ALfloat minf(ALfloat a, ALfloat b);
+extern inline ALfloat maxf(ALfloat a, ALfloat b);
+extern inline ALfloat clampf(ALfloat val, ALfloat min, ALfloat max);
+
+extern inline ALuint minu(ALuint a, ALuint b);
+extern inline ALuint maxu(ALuint a, ALuint b);
+extern inline ALuint clampu(ALuint val, ALuint min, ALuint max);
+
+extern inline ALint mini(ALint a, ALint b);
+extern inline ALint maxi(ALint a, ALint b);
+extern inline ALint clampi(ALint val, ALint min, ALint max);
+
+extern inline ALint64 mini64(ALint64 a, ALint64 b);
+extern inline ALint64 maxi64(ALint64 a, ALint64 b);
+extern inline ALint64 clampi64(ALint64 val, ALint64 min, ALint64 max);
+
+extern inline ALuint64 minu64(ALuint64 a, ALuint64 b);
+extern inline ALuint64 maxu64(ALuint64 a, ALuint64 b);
+extern inline ALuint64 clampu64(ALuint64 val, ALuint64 min, ALuint64 max);
+
+extern inline ALfloat lerp(ALfloat val1, ALfloat val2, ALfloat mu);
+extern inline ALfloat cubic(ALfloat val0, ALfloat val1, ALfloat val2, ALfloat val3, ALfloat mu);
static ResamplerFunc SelectResampler(enum Resampler Resampler, ALuint increment)
{
diff --git a/Alc/helpers.c b/Alc/helpers.c
index 94dedcf8..6c6c88e2 100644
--- a/Alc/helpers.c
+++ b/Alc/helpers.c
@@ -86,6 +86,10 @@ extern inline void UnlockUIntMapRead(UIntMap *map);
extern inline void LockUIntMapWrite(UIntMap *map);
extern inline void UnlockUIntMapWrite(UIntMap *map);
+extern inline ALuint NextPowerOf2(ALuint value);
+extern inline ALint fastf2i(ALfloat f);
+extern inline ALuint fastf2u(ALfloat f);
+
ALuint CPUCapFlags = 0;
diff --git a/Alc/panning.c b/Alc/panning.c
index 80041696..30a1e571 100644
--- a/Alc/panning.c
+++ b/Alc/panning.c
@@ -31,6 +31,8 @@
#include "AL/alc.h"
#include "alu.h"
+extern inline void SetGains(const ALCdevice *device, ALfloat ingain, ALfloat gains[MaxChannels]);
+
static void SetSpeakerArrangement(const char *name, ALfloat SpeakerAngle[MaxChannels],
enum Channel Speaker2Chan[MaxChannels], ALint chans)
{