aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-05-28 22:27:07 -0700
committerChris Robinson <[email protected]>2013-05-28 22:27:07 -0700
commite96cc656e9c9176ba60cd191896fd6386a7fd74d (patch)
treeb6deb2a859ca08a519f9ff2c1c3d9022eb698462 /OpenAL32
parent48aa1e10d64d7c62cab856a0c5d7f9e140efbd6b (diff)
Use C99's inline instead of __inline
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alBuffer.h6
-rw-r--r--OpenAL32/Include/alEffect.h2
-rw-r--r--OpenAL32/Include/alFilter.h4
-rw-r--r--OpenAL32/Include/alMain.h72
-rw-r--r--OpenAL32/Include/alu.h34
-rw-r--r--OpenAL32/alAuxEffectSlot.c2
-rw-r--r--OpenAL32/alBuffer.c220
7 files changed, 170 insertions, 170 deletions
diff --git a/OpenAL32/Include/alBuffer.h b/OpenAL32/Include/alBuffer.h
index 8ecc4dd8..f1d64666 100644
--- a/OpenAL32/Include/alBuffer.h
+++ b/OpenAL32/Include/alBuffer.h
@@ -35,8 +35,8 @@ enum UserFmtChannels {
ALuint BytesFromUserFmt(enum UserFmtType type);
ALuint ChannelsFromUserFmt(enum UserFmtChannels chans);
-static __inline ALuint FrameSizeFromUserFmt(enum UserFmtChannels chans,
- enum UserFmtType type)
+static inline ALuint FrameSizeFromUserFmt(enum UserFmtChannels chans,
+ enum UserFmtType type)
{
return ChannelsFromUserFmt(chans) * BytesFromUserFmt(type);
}
@@ -60,7 +60,7 @@ enum FmtChannels {
ALuint BytesFromFmt(enum FmtType type);
ALuint ChannelsFromFmt(enum FmtChannels chans);
-static __inline ALuint FrameSizeFromFmt(enum FmtChannels chans, enum FmtType type)
+static inline ALuint FrameSizeFromFmt(enum FmtChannels chans, enum FmtType type)
{
return ChannelsFromFmt(chans) * BytesFromFmt(type);
}
diff --git a/OpenAL32/Include/alEffect.h b/OpenAL32/Include/alEffect.h
index a685681e..a1b430e9 100644
--- a/OpenAL32/Include/alEffect.h
+++ b/OpenAL32/Include/alEffect.h
@@ -162,7 +162,7 @@ typedef struct ALeffect {
ALuint id;
} ALeffect;
-static __inline ALboolean IsReverbEffect(ALenum type)
+static inline ALboolean IsReverbEffect(ALenum type)
{ return type == AL_EFFECT_REVERB || type == AL_EFFECT_EAXREVERB; }
ALenum InitEffect(ALeffect *effect);
diff --git a/OpenAL32/Include/alFilter.h b/OpenAL32/Include/alFilter.h
index f42747f2..605c96c7 100644
--- a/OpenAL32/Include/alFilter.h
+++ b/OpenAL32/Include/alFilter.h
@@ -31,7 +31,7 @@ typedef struct ALfilterState {
void ALfilterState_clear(ALfilterState *filter);
void ALfilterState_setParams(ALfilterState *filter, ALfilterType type, ALfloat gain, ALfloat freq_scale, ALfloat bandwidth);
-static __inline ALfloat ALfilterState_processSingle(ALfilterState *filter, ALfloat sample)
+static inline ALfloat ALfilterState_processSingle(ALfilterState *filter, ALfloat sample)
{
ALfloat outsmp;
@@ -48,7 +48,7 @@ static __inline ALfloat ALfilterState_processSingle(ALfilterState *filter, ALflo
return outsmp;
}
-static __inline ALfloat ALfilterState_processSingleC(const ALfilterState *filter, ALfloat sample)
+static inline ALfloat ALfilterState_processSingleC(const ALfilterState *filter, ALfloat sample)
{
return filter->b[0] * sample +
filter->b[1] * filter->x[0] +
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index c0c7baac..9bf10903 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -109,7 +109,7 @@ typedef LONG pthread_once_t;
#define PTHREAD_ONCE_INIT 0
void pthread_once(pthread_once_t *once, void (*callback)(void));
-static __inline int sched_yield(void)
+static inline int sched_yield(void)
{ SwitchToThread(); return 0; }
#else
@@ -143,31 +143,31 @@ typedef void *volatile XchgPtr;
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) && !defined(__QNXNTO__)
typedef ALuint RefCount;
-static __inline RefCount IncrementRef(volatile RefCount *ptr)
+static inline RefCount IncrementRef(volatile RefCount *ptr)
{ return __sync_add_and_fetch(ptr, 1); }
-static __inline RefCount DecrementRef(volatile RefCount *ptr)
+static inline RefCount DecrementRef(volatile RefCount *ptr)
{ return __sync_sub_and_fetch(ptr, 1); }
-static __inline int ExchangeInt(volatile int *ptr, int newval)
+static inline int ExchangeInt(volatile int *ptr, int newval)
{
return __sync_lock_test_and_set(ptr, newval);
}
-static __inline void *ExchangePtr(XchgPtr *ptr, void *newval)
+static inline void *ExchangePtr(XchgPtr *ptr, void *newval)
{
return __sync_lock_test_and_set(ptr, newval);
}
-static __inline ALboolean CompExchangeInt(volatile int *ptr, int oldval, int newval)
+static inline ALboolean CompExchangeInt(volatile int *ptr, int oldval, int newval)
{
return __sync_bool_compare_and_swap(ptr, oldval, newval);
}
-static __inline ALboolean CompExchangePtr(XchgPtr *ptr, void *oldval, void *newval)
+static inline ALboolean CompExchangePtr(XchgPtr *ptr, void *oldval, void *newval)
{
return __sync_bool_compare_and_swap(ptr, oldval, newval);
}
#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
-static __inline int xaddl(volatile int *dest, int incr)
+static inline int xaddl(volatile int *dest, int incr)
{
int ret;
__asm__ __volatile__("lock; xaddl %0,(%1)"
@@ -178,12 +178,12 @@ static __inline int xaddl(volatile int *dest, int incr)
}
typedef int RefCount;
-static __inline RefCount IncrementRef(volatile RefCount *ptr)
+static inline RefCount IncrementRef(volatile RefCount *ptr)
{ return xaddl(ptr, 1)+1; }
-static __inline RefCount DecrementRef(volatile RefCount *ptr)
+static inline RefCount DecrementRef(volatile RefCount *ptr)
{ return xaddl(ptr, -1)-1; }
-static __inline int ExchangeInt(volatile int *dest, int newval)
+static inline int ExchangeInt(volatile int *dest, int newval)
{
int ret;
__asm__ __volatile__("lock; xchgl %0,(%1)"
@@ -193,7 +193,7 @@ static __inline int ExchangeInt(volatile int *dest, int newval)
return ret;
}
-static __inline ALboolean CompExchangeInt(volatile int *dest, int oldval, int newval)
+static inline ALboolean CompExchangeInt(volatile int *dest, int oldval, int newval)
{
int ret;
__asm__ __volatile__("lock; cmpxchgl %2,(%1)"
@@ -203,7 +203,7 @@ static __inline ALboolean CompExchangeInt(volatile int *dest, int oldval, int ne
return ret == oldval;
}
-static __inline void *ExchangePtr(XchgPtr *dest, void *newval)
+static inline void *ExchangePtr(XchgPtr *dest, void *newval)
{
void *ret;
__asm__ __volatile__(
@@ -219,7 +219,7 @@ static __inline void *ExchangePtr(XchgPtr *dest, void *newval)
return ret;
}
-static __inline ALboolean CompExchangePtr(XchgPtr *dest, void *oldval, void *newval)
+static inline ALboolean CompExchangePtr(XchgPtr *dest, void *oldval, void *newval)
{
void *ret;
__asm__ __volatile__(
@@ -238,14 +238,14 @@ static __inline ALboolean CompExchangePtr(XchgPtr *dest, void *oldval, void *new
#elif defined(_WIN32)
typedef LONG RefCount;
-static __inline RefCount IncrementRef(volatile RefCount *ptr)
+static inline RefCount IncrementRef(volatile RefCount *ptr)
{ return InterlockedIncrement(ptr); }
-static __inline RefCount DecrementRef(volatile RefCount *ptr)
+static inline RefCount DecrementRef(volatile RefCount *ptr)
{ return InterlockedDecrement(ptr); }
extern ALbyte LONG_size_does_not_match_int[(sizeof(LONG)==sizeof(int))?1:-1];
-static __inline int ExchangeInt(volatile int *ptr, int newval)
+static inline int ExchangeInt(volatile int *ptr, int newval)
{
union {
volatile int *i;
@@ -253,11 +253,11 @@ static __inline int ExchangeInt(volatile int *ptr, int newval)
} u = { ptr };
return InterlockedExchange(u.l, newval);
}
-static __inline void *ExchangePtr(XchgPtr *ptr, void *newval)
+static inline void *ExchangePtr(XchgPtr *ptr, void *newval)
{
return InterlockedExchangePointer(ptr, newval);
}
-static __inline ALboolean CompExchangeInt(volatile int *ptr, int oldval, int newval)
+static inline ALboolean CompExchangeInt(volatile int *ptr, int oldval, int newval)
{
union {
volatile int *i;
@@ -265,7 +265,7 @@ static __inline ALboolean CompExchangeInt(volatile int *ptr, int oldval, int new
} u = { ptr };
return InterlockedCompareExchange(u.l, newval, oldval) == oldval;
}
-static __inline ALboolean CompExchangePtr(XchgPtr *ptr, void *oldval, void *newval)
+static inline ALboolean CompExchangePtr(XchgPtr *ptr, void *oldval, void *newval)
{
return InterlockedCompareExchangePointer(ptr, newval, oldval) == oldval;
}
@@ -275,12 +275,12 @@ static __inline ALboolean CompExchangePtr(XchgPtr *ptr, void *oldval, void *newv
#include <libkern/OSAtomic.h>
typedef int32_t RefCount;
-static __inline RefCount IncrementRef(volatile RefCount *ptr)
+static inline RefCount IncrementRef(volatile RefCount *ptr)
{ return OSAtomicIncrement32Barrier(ptr); }
-static __inline RefCount DecrementRef(volatile RefCount *ptr)
+static inline RefCount DecrementRef(volatile RefCount *ptr)
{ return OSAtomicDecrement32Barrier(ptr); }
-static __inline int ExchangeInt(volatile int *ptr, int newval)
+static inline int ExchangeInt(volatile int *ptr, int newval)
{
/* Really? No regular old atomic swap? */
int oldval;
@@ -289,7 +289,7 @@ static __inline int ExchangeInt(volatile int *ptr, int newval)
} while(!OSAtomicCompareAndSwap32Barrier(oldval, newval, ptr));
return oldval;
}
-static __inline void *ExchangePtr(XchgPtr *ptr, void *newval)
+static inline void *ExchangePtr(XchgPtr *ptr, void *newval)
{
void *oldval;
do {
@@ -297,11 +297,11 @@ static __inline void *ExchangePtr(XchgPtr *ptr, void *newval)
} while(!OSAtomicCompareAndSwapPtrBarrier(oldval, newval, ptr));
return oldval;
}
-static __inline ALboolean CompExchangeInt(volatile int *ptr, int oldval, int newval)
+static inline ALboolean CompExchangeInt(volatile int *ptr, int oldval, int newval)
{
return OSAtomicCompareAndSwap32Barrier(oldval, newval, ptr);
}
-static __inline ALboolean CompExchangePtr(XchgPtr *ptr, void *oldval, void *newval)
+static inline ALboolean CompExchangePtr(XchgPtr *ptr, void *oldval, void *newval)
{
return OSAtomicCompareAndSwapPtrBarrier(oldval, newval, ptr);
}
@@ -345,13 +345,13 @@ ALenum InsertUIntMapEntry(UIntMap *map, ALuint key, ALvoid *value);
ALvoid *RemoveUIntMapKey(UIntMap *map, ALuint key);
ALvoid *LookupUIntMapKey(UIntMap *map, ALuint key);
-static __inline void LockUIntMapRead(UIntMap *map)
+static inline void LockUIntMapRead(UIntMap *map)
{ ReadLock(&map->lock); }
-static __inline void UnlockUIntMapRead(UIntMap *map)
+static inline void UnlockUIntMapRead(UIntMap *map)
{ ReadUnlock(&map->lock); }
-static __inline void LockUIntMapWrite(UIntMap *map)
+static inline void LockUIntMapWrite(UIntMap *map)
{ WriteLock(&map->lock); }
-static __inline void UnlockUIntMapWrite(UIntMap *map)
+static inline void UnlockUIntMapWrite(UIntMap *map)
{ WriteUnlock(&map->lock); }
@@ -367,7 +367,7 @@ struct Hrtf;
// Find the next power-of-2 for non-power-of-2 numbers.
-static __inline ALuint NextPowerOf2(ALuint value)
+static inline ALuint NextPowerOf2(ALuint value)
{
if(value > 0)
{
@@ -383,7 +383,7 @@ static __inline ALuint NextPowerOf2(ALuint value)
/* Fast float-to-int conversion. Assumes the FPU is already in round-to-zero
* mode. */
-static __inline ALint fastf2i(ALfloat f)
+static inline ALint fastf2i(ALfloat f)
{
#ifdef HAVE_LRINTF
return lrintf(f);
@@ -399,7 +399,7 @@ static __inline ALint fastf2i(ALfloat f)
/* Fast float-to-uint conversion. Assumes the FPU is already in round-to-zero
* mode. */
-static __inline ALuint fastf2u(ALfloat f)
+static inline ALuint fastf2u(ALfloat f)
{ return fastf2i(f); }
@@ -546,7 +546,7 @@ enum DevFmtChannels {
ALuint BytesFromDevFmt(enum DevFmtType type);
ALuint ChannelsFromDevFmt(enum DevFmtChannels chans);
-static __inline ALuint FrameSizeFromDevFmt(enum DevFmtChannels chans,
+static inline ALuint FrameSizeFromDevFmt(enum DevFmtChannels chans,
enum DevFmtType type)
{
return ChannelsFromDevFmt(chans) * BytesFromDevFmt(type);
@@ -751,9 +751,9 @@ void ALCdevice_LockDefault(ALCdevice *device);
void ALCdevice_UnlockDefault(ALCdevice *device);
ALint64 ALCdevice_GetLatencyDefault(ALCdevice *device);
-static __inline void LockContext(ALCcontext *context)
+static inline void LockContext(ALCcontext *context)
{ ALCdevice_Lock(context->Device); }
-static __inline void UnlockContext(ALCcontext *context)
+static inline void UnlockContext(ALCcontext *context)
{ ALCdevice_Unlock(context->Device); }
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index f323b0d0..b389ec1e 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -51,47 +51,47 @@ typedef ALvoid (*WetMixerFunc)(const struct SendParams *params,
#define FRACTIONMASK (FRACTIONONE-1)
-static __inline ALfloat minf(ALfloat a, ALfloat b)
+static inline ALfloat minf(ALfloat a, ALfloat b)
{ return ((a > b) ? b : a); }
-static __inline ALfloat maxf(ALfloat a, ALfloat b)
+static inline ALfloat maxf(ALfloat a, ALfloat b)
{ return ((a > b) ? a : b); }
-static __inline ALfloat clampf(ALfloat val, ALfloat min, ALfloat max)
+static inline ALfloat clampf(ALfloat val, ALfloat min, ALfloat max)
{ return minf(max, maxf(min, val)); }
-static __inline ALuint minu(ALuint a, ALuint b)
+static inline ALuint minu(ALuint a, ALuint b)
{ return ((a > b) ? b : a); }
-static __inline ALuint maxu(ALuint a, ALuint b)
+static inline ALuint maxu(ALuint a, ALuint b)
{ return ((a > b) ? a : b); }
-static __inline ALuint clampu(ALuint val, ALuint min, ALuint max)
+static inline ALuint clampu(ALuint val, ALuint min, ALuint max)
{ return minu(max, maxu(min, val)); }
-static __inline ALint mini(ALint a, ALint b)
+static inline ALint mini(ALint a, ALint b)
{ return ((a > b) ? b : a); }
-static __inline ALint maxi(ALint a, ALint b)
+static inline ALint maxi(ALint a, ALint b)
{ return ((a > b) ? a : b); }
-static __inline ALint clampi(ALint val, ALint min, ALint max)
+static inline ALint clampi(ALint val, ALint min, ALint max)
{ return mini(max, maxi(min, val)); }
-static __inline ALint64 mini64(ALint64 a, ALint64 b)
+static inline ALint64 mini64(ALint64 a, ALint64 b)
{ return ((a > b) ? b : a); }
-static __inline ALint64 maxi64(ALint64 a, ALint64 b)
+static inline ALint64 maxi64(ALint64 a, ALint64 b)
{ return ((a > b) ? a : b); }
-static __inline ALint64 clampi64(ALint64 val, ALint64 min, ALint64 max)
+static inline ALint64 clampi64(ALint64 val, ALint64 min, ALint64 max)
{ return mini64(max, maxi64(min, val)); }
-static __inline ALuint64 minu64(ALuint64 a, ALuint64 b)
+static inline ALuint64 minu64(ALuint64 a, ALuint64 b)
{ return ((a > b) ? b : a); }
-static __inline ALuint64 maxu64(ALuint64 a, ALuint64 b)
+static inline ALuint64 maxu64(ALuint64 a, ALuint64 b)
{ return ((a > b) ? a : b); }
-static __inline ALuint64 clampu64(ALuint64 val, ALuint64 min, ALuint64 max)
+static 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)
+static 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)
+static 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;
diff --git a/OpenAL32/alAuxEffectSlot.c b/OpenAL32/alAuxEffectSlot.c
index 06eb6823..99cac58e 100644
--- a/OpenAL32/alAuxEffectSlot.c
+++ b/OpenAL32/alAuxEffectSlot.c
@@ -37,7 +37,7 @@ static ALvoid RemoveEffectSlotArray(ALCcontext *Context, ALeffectslot *slot);
static UIntMap EffectStateFactoryMap;
-static __inline ALeffectStateFactory *getFactoryByType(ALenum type)
+static inline ALeffectStateFactory *getFactoryByType(ALenum type)
{
ALeffectStateFactory* (*getFactory)(void) = LookupUIntMapKey(&EffectStateFactoryMap, type);
if(getFactory != NULL)
diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c
index af6e1ffc..2daa2e3d 100644
--- a/OpenAL32/alBuffer.c
+++ b/OpenAL32/alBuffer.c
@@ -1030,7 +1030,7 @@ typedef struct {
} ALubyte3;
extern ALbyte ALubyte3_size_is_not_3[(sizeof(ALubyte3)==sizeof(ALubyte[3]))?1:-1];
-static __inline ALshort DecodeMuLaw(ALmulaw val)
+static inline ALshort DecodeMuLaw(ALmulaw val)
{ return muLawDecompressionTable[val]; }
static ALmulaw EncodeMuLaw(ALshort val)
@@ -1055,7 +1055,7 @@ static ALmulaw EncodeMuLaw(ALshort val)
return ~(sign | (exp<<4) | mant);
}
-static __inline ALshort DecodeALaw(ALalaw val)
+static inline ALshort DecodeALaw(ALalaw val)
{ return aLawDecompressionTable[val]; }
static ALalaw EncodeALaw(ALshort val)
@@ -1202,14 +1202,14 @@ static void EncodeIMA4Block(ALima4 *dst, const ALshort *src, ALint *sample, ALin
}
-static __inline ALint DecodeByte3(ALbyte3 val)
+static inline ALint DecodeByte3(ALbyte3 val)
{
if(IS_LITTLE_ENDIAN)
return (val.b[2]<<16) | (((ALubyte)val.b[1])<<8) | ((ALubyte)val.b[0]);
return (val.b[0]<<16) | (((ALubyte)val.b[1])<<8) | ((ALubyte)val.b[2]);
}
-static __inline ALbyte3 EncodeByte3(ALint val)
+static inline ALbyte3 EncodeByte3(ALint val)
{
if(IS_LITTLE_ENDIAN)
{
@@ -1223,14 +1223,14 @@ static __inline ALbyte3 EncodeByte3(ALint val)
}
}
-static __inline ALint DecodeUByte3(ALubyte3 val)
+static inline ALint DecodeUByte3(ALubyte3 val)
{
if(IS_LITTLE_ENDIAN)
return (val.b[2]<<16) | (val.b[1]<<8) | (val.b[0]);
return (val.b[0]<<16) | (val.b[1]<<8) | val.b[2];
}
-static __inline ALubyte3 EncodeUByte3(ALint val)
+static inline ALubyte3 EncodeUByte3(ALint val)
{
if(IS_LITTLE_ENDIAN)
{
@@ -1245,256 +1245,256 @@ static __inline ALubyte3 EncodeUByte3(ALint val)
}
-static __inline ALbyte Conv_ALbyte_ALbyte(ALbyte val)
+static inline ALbyte Conv_ALbyte_ALbyte(ALbyte val)
{ return val; }
-static __inline ALbyte Conv_ALbyte_ALubyte(ALubyte val)
+static inline ALbyte Conv_ALbyte_ALubyte(ALubyte val)
{ return val-128; }
-static __inline ALbyte Conv_ALbyte_ALshort(ALshort val)
+static inline ALbyte Conv_ALbyte_ALshort(ALshort val)
{ return val>>8; }
-static __inline ALbyte Conv_ALbyte_ALushort(ALushort val)
+static inline ALbyte Conv_ALbyte_ALushort(ALushort val)
{ return (val>>8)-128; }
-static __inline ALbyte Conv_ALbyte_ALint(ALint val)
+static inline ALbyte Conv_ALbyte_ALint(ALint val)
{ return val>>24; }
-static __inline ALbyte Conv_ALbyte_ALuint(ALuint val)
+static inline ALbyte Conv_ALbyte_ALuint(ALuint val)
{ return (val>>24)-128; }
-static __inline ALbyte Conv_ALbyte_ALfloat(ALfloat val)
+static inline ALbyte Conv_ALbyte_ALfloat(ALfloat val)
{
if(val > 1.0f) return 127;
if(val < -1.0f) return -128;
return (ALint)(val * 127.0f);
}
-static __inline ALbyte Conv_ALbyte_ALdouble(ALdouble val)
+static inline ALbyte Conv_ALbyte_ALdouble(ALdouble val)
{
if(val > 1.0) return 127;
if(val < -1.0) return -128;
return (ALint)(val * 127.0);
}
-static __inline ALbyte Conv_ALbyte_ALmulaw(ALmulaw val)
+static inline ALbyte Conv_ALbyte_ALmulaw(ALmulaw val)
{ return Conv_ALbyte_ALshort(DecodeMuLaw(val)); }
-static __inline ALbyte Conv_ALbyte_ALalaw(ALalaw val)
+static inline ALbyte Conv_ALbyte_ALalaw(ALalaw val)
{ return Conv_ALbyte_ALshort(DecodeALaw(val)); }
-static __inline ALbyte Conv_ALbyte_ALbyte3(ALbyte3 val)
+static inline ALbyte Conv_ALbyte_ALbyte3(ALbyte3 val)
{ return DecodeByte3(val)>>16; }
-static __inline ALbyte Conv_ALbyte_ALubyte3(ALubyte3 val)
+static inline ALbyte Conv_ALbyte_ALubyte3(ALubyte3 val)
{ return (DecodeUByte3(val)>>16)-128; }
-static __inline ALubyte Conv_ALubyte_ALbyte(ALbyte val)
+static inline ALubyte Conv_ALubyte_ALbyte(ALbyte val)
{ return val+128; }
-static __inline ALubyte Conv_ALubyte_ALubyte(ALubyte val)
+static inline ALubyte Conv_ALubyte_ALubyte(ALubyte val)
{ return val; }
-static __inline ALubyte Conv_ALubyte_ALshort(ALshort val)
+static inline ALubyte Conv_ALubyte_ALshort(ALshort val)
{ return (val>>8)+128; }
-static __inline ALubyte Conv_ALubyte_ALushort(ALushort val)
+static inline ALubyte Conv_ALubyte_ALushort(ALushort val)
{ return val>>8; }
-static __inline ALubyte Conv_ALubyte_ALint(ALint val)
+static inline ALubyte Conv_ALubyte_ALint(ALint val)
{ return (val>>24)+128; }
-static __inline ALubyte Conv_ALubyte_ALuint(ALuint val)
+static inline ALubyte Conv_ALubyte_ALuint(ALuint val)
{ return val>>24; }
-static __inline ALubyte Conv_ALubyte_ALfloat(ALfloat val)
+static inline ALubyte Conv_ALubyte_ALfloat(ALfloat val)
{
if(val > 1.0f) return 255;
if(val < -1.0f) return 0;
return (ALint)(val * 127.0f) + 128;
}
-static __inline ALubyte Conv_ALubyte_ALdouble(ALdouble val)
+static inline ALubyte Conv_ALubyte_ALdouble(ALdouble val)
{
if(val > 1.0) return 255;
if(val < -1.0) return 0;
return (ALint)(val * 127.0) + 128;
}
-static __inline ALubyte Conv_ALubyte_ALmulaw(ALmulaw val)
+static inline ALubyte Conv_ALubyte_ALmulaw(ALmulaw val)
{ return Conv_ALubyte_ALshort(DecodeMuLaw(val)); }
-static __inline ALubyte Conv_ALubyte_ALalaw(ALalaw val)
+static inline ALubyte Conv_ALubyte_ALalaw(ALalaw val)
{ return Conv_ALubyte_ALshort(DecodeALaw(val)); }
-static __inline ALubyte Conv_ALubyte_ALbyte3(ALbyte3 val)
+static inline ALubyte Conv_ALubyte_ALbyte3(ALbyte3 val)
{ return (DecodeByte3(val)>>16)+128; }
-static __inline ALubyte Conv_ALubyte_ALubyte3(ALubyte3 val)
+static inline ALubyte Conv_ALubyte_ALubyte3(ALubyte3 val)
{ return DecodeUByte3(val)>>16; }
-static __inline ALshort Conv_ALshort_ALbyte(ALbyte val)
+static inline ALshort Conv_ALshort_ALbyte(ALbyte val)
{ return val<<8; }
-static __inline ALshort Conv_ALshort_ALubyte(ALubyte val)
+static inline ALshort Conv_ALshort_ALubyte(ALubyte val)
{ return (val-128)<<8; }
-static __inline ALshort Conv_ALshort_ALshort(ALshort val)
+static inline ALshort Conv_ALshort_ALshort(ALshort val)
{ return val; }
-static __inline ALshort Conv_ALshort_ALushort(ALushort val)
+static inline ALshort Conv_ALshort_ALushort(ALushort val)
{ return val-32768; }
-static __inline ALshort Conv_ALshort_ALint(ALint val)
+static inline ALshort Conv_ALshort_ALint(ALint val)
{ return val>>16; }
-static __inline ALshort Conv_ALshort_ALuint(ALuint val)
+static inline ALshort Conv_ALshort_ALuint(ALuint val)
{ return (val>>16)-32768; }
-static __inline ALshort Conv_ALshort_ALfloat(ALfloat val)
+static inline ALshort Conv_ALshort_ALfloat(ALfloat val)
{
if(val > 1.0f) return 32767;
if(val < -1.0f) return -32768;
return (ALint)(val * 32767.0f);
}
-static __inline ALshort Conv_ALshort_ALdouble(ALdouble val)
+static inline ALshort Conv_ALshort_ALdouble(ALdouble val)
{
if(val > 1.0) return 32767;
if(val < -1.0) return -32768;
return (ALint)(val * 32767.0);
}
-static __inline ALshort Conv_ALshort_ALmulaw(ALmulaw val)
+static inline ALshort Conv_ALshort_ALmulaw(ALmulaw val)
{ return Conv_ALshort_ALshort(DecodeMuLaw(val)); }
-static __inline ALshort Conv_ALshort_ALalaw(ALalaw val)
+static inline ALshort Conv_ALshort_ALalaw(ALalaw val)
{ return Conv_ALshort_ALshort(DecodeALaw(val)); }
-static __inline ALshort Conv_ALshort_ALbyte3(ALbyte3 val)
+static inline ALshort Conv_ALshort_ALbyte3(ALbyte3 val)
{ return DecodeByte3(val)>>8; }
-static __inline ALshort Conv_ALshort_ALubyte3(ALubyte3 val)
+static inline ALshort Conv_ALshort_ALubyte3(ALubyte3 val)
{ return (DecodeUByte3(val)>>8)-32768; }
-static __inline ALushort Conv_ALushort_ALbyte(ALbyte val)
+static inline ALushort Conv_ALushort_ALbyte(ALbyte val)
{ return (val+128)<<8; }
-static __inline ALushort Conv_ALushort_ALubyte(ALubyte val)
+static inline ALushort Conv_ALushort_ALubyte(ALubyte val)
{ return val<<8; }
-static __inline ALushort Conv_ALushort_ALshort(ALshort val)
+static inline ALushort Conv_ALushort_ALshort(ALshort val)
{ return val+32768; }
-static __inline ALushort Conv_ALushort_ALushort(ALushort val)
+static inline ALushort Conv_ALushort_ALushort(ALushort val)
{ return val; }
-static __inline ALushort Conv_ALushort_ALint(ALint val)
+static inline ALushort Conv_ALushort_ALint(ALint val)
{ return (val>>16)+32768; }
-static __inline ALushort Conv_ALushort_ALuint(ALuint val)
+static inline ALushort Conv_ALushort_ALuint(ALuint val)
{ return val>>16; }
-static __inline ALushort Conv_ALushort_ALfloat(ALfloat val)
+static inline ALushort Conv_ALushort_ALfloat(ALfloat val)
{
if(val > 1.0f) return 65535;
if(val < -1.0f) return 0;
return (ALint)(val * 32767.0f) + 32768;
}
-static __inline ALushort Conv_ALushort_ALdouble(ALdouble val)
+static inline ALushort Conv_ALushort_ALdouble(ALdouble val)
{
if(val > 1.0) return 65535;
if(val < -1.0) return 0;
return (ALint)(val * 32767.0) + 32768;
}
-static __inline ALushort Conv_ALushort_ALmulaw(ALmulaw val)
+static inline ALushort Conv_ALushort_ALmulaw(ALmulaw val)
{ return Conv_ALushort_ALshort(DecodeMuLaw(val)); }
-static __inline ALushort Conv_ALushort_ALalaw(ALalaw val)
+static inline ALushort Conv_ALushort_ALalaw(ALalaw val)
{ return Conv_ALushort_ALshort(DecodeALaw(val)); }
-static __inline ALushort Conv_ALushort_ALbyte3(ALbyte3 val)
+static inline ALushort Conv_ALushort_ALbyte3(ALbyte3 val)
{ return (DecodeByte3(val)>>8)+32768; }
-static __inline ALushort Conv_ALushort_ALubyte3(ALubyte3 val)
+static inline ALushort Conv_ALushort_ALubyte3(ALubyte3 val)
{ return DecodeUByte3(val)>>8; }
-static __inline ALint Conv_ALint_ALbyte(ALbyte val)
+static inline ALint Conv_ALint_ALbyte(ALbyte val)
{ return val<<24; }
-static __inline ALint Conv_ALint_ALubyte(ALubyte val)
+static inline ALint Conv_ALint_ALubyte(ALubyte val)
{ return (val-128)<<24; }
-static __inline ALint Conv_ALint_ALshort(ALshort val)
+static inline ALint Conv_ALint_ALshort(ALshort val)
{ return val<<16; }
-static __inline ALint Conv_ALint_ALushort(ALushort val)
+static inline ALint Conv_ALint_ALushort(ALushort val)
{ return (val-32768)<<16; }
-static __inline ALint Conv_ALint_ALint(ALint val)
+static inline ALint Conv_ALint_ALint(ALint val)
{ return val; }
-static __inline ALint Conv_ALint_ALuint(ALuint val)
+static inline ALint Conv_ALint_ALuint(ALuint val)
{ return val-2147483648u; }
-static __inline ALint Conv_ALint_ALfloat(ALfloat val)
+static inline ALint Conv_ALint_ALfloat(ALfloat val)
{
if(val > 1.0f) return 2147483647;
if(val < -1.0f) return -2147483647-1;
return (ALint)(val*16777215.0f) << 7;
}
-static __inline ALint Conv_ALint_ALdouble(ALdouble val)
+static inline ALint Conv_ALint_ALdouble(ALdouble val)
{
if(val > 1.0) return 2147483647;
if(val < -1.0) return -2147483647-1;
return (ALint)(val * 2147483647.0);
}
-static __inline ALint Conv_ALint_ALmulaw(ALmulaw val)
+static inline ALint Conv_ALint_ALmulaw(ALmulaw val)
{ return Conv_ALint_ALshort(DecodeMuLaw(val)); }
-static __inline ALint Conv_ALint_ALalaw(ALalaw val)
+static inline ALint Conv_ALint_ALalaw(ALalaw val)
{ return Conv_ALint_ALshort(DecodeALaw(val)); }
-static __inline ALint Conv_ALint_ALbyte3(ALbyte3 val)
+static inline ALint Conv_ALint_ALbyte3(ALbyte3 val)
{ return DecodeByte3(val)<<8; }
-static __inline ALint Conv_ALint_ALubyte3(ALubyte3 val)
+static inline ALint Conv_ALint_ALubyte3(ALubyte3 val)
{ return (DecodeUByte3(val)-8388608)<<8; }
-static __inline ALuint Conv_ALuint_ALbyte(ALbyte val)
+static inline ALuint Conv_ALuint_ALbyte(ALbyte val)
{ return (val+128)<<24; }
-static __inline ALuint Conv_ALuint_ALubyte(ALubyte val)
+static inline ALuint Conv_ALuint_ALubyte(ALubyte val)
{ return val<<24; }
-static __inline ALuint Conv_ALuint_ALshort(ALshort val)
+static inline ALuint Conv_ALuint_ALshort(ALshort val)
{ return (val+32768)<<16; }
-static __inline ALuint Conv_ALuint_ALushort(ALushort val)
+static inline ALuint Conv_ALuint_ALushort(ALushort val)
{ return val<<16; }
-static __inline ALuint Conv_ALuint_ALint(ALint val)
+static inline ALuint Conv_ALuint_ALint(ALint val)
{ return val+2147483648u; }
-static __inline ALuint Conv_ALuint_ALuint(ALuint val)
+static inline ALuint Conv_ALuint_ALuint(ALuint val)
{ return val; }
-static __inline ALuint Conv_ALuint_ALfloat(ALfloat val)
+static inline ALuint Conv_ALuint_ALfloat(ALfloat val)
{
if(val > 1.0f) return 4294967295u;
if(val < -1.0f) return 0;
return ((ALint)(val*16777215.0f)<<7) + 2147483648u;
}
-static __inline ALuint Conv_ALuint_ALdouble(ALdouble val)
+static inline ALuint Conv_ALuint_ALdouble(ALdouble val)
{
if(val > 1.0) return 4294967295u;
if(val < -1.0) return 0;
return (ALint)(val * 2147483647.0) + 2147483648u;
}
-static __inline ALuint Conv_ALuint_ALmulaw(ALmulaw val)
+static inline ALuint Conv_ALuint_ALmulaw(ALmulaw val)
{ return Conv_ALuint_ALshort(DecodeMuLaw(val)); }
-static __inline ALuint Conv_ALuint_ALalaw(ALalaw val)
+static inline ALuint Conv_ALuint_ALalaw(ALalaw val)
{ return Conv_ALuint_ALshort(DecodeALaw(val)); }
-static __inline ALuint Conv_ALuint_ALbyte3(ALbyte3 val)
+static inline ALuint Conv_ALuint_ALbyte3(ALbyte3 val)
{ return (DecodeByte3(val)+8388608)<<8; }
-static __inline ALuint Conv_ALuint_ALubyte3(ALubyte3 val)
+static inline ALuint Conv_ALuint_ALubyte3(ALubyte3 val)
{ return DecodeUByte3(val)<<8; }
-static __inline ALfloat Conv_ALfloat_ALbyte(ALbyte val)
+static inline ALfloat Conv_ALfloat_ALbyte(ALbyte val)
{ return val * (1.0f/127.0f); }
-static __inline ALfloat Conv_ALfloat_ALubyte(ALubyte val)
+static inline ALfloat Conv_ALfloat_ALubyte(ALubyte val)
{ return (val-128) * (1.0f/127.0f); }
-static __inline ALfloat Conv_ALfloat_ALshort(ALshort val)
+static inline ALfloat Conv_ALfloat_ALshort(ALshort val)
{ return val * (1.0f/32767.0f); }
-static __inline ALfloat Conv_ALfloat_ALushort(ALushort val)
+static inline ALfloat Conv_ALfloat_ALushort(ALushort val)
{ return (val-32768) * (1.0f/32767.0f); }
-static __inline ALfloat Conv_ALfloat_ALint(ALint val)
+static inline ALfloat Conv_ALfloat_ALint(ALint val)
{ return (ALfloat)(val * (1.0/2147483647.0)); }
-static __inline ALfloat Conv_ALfloat_ALuint(ALuint val)
+static inline ALfloat Conv_ALfloat_ALuint(ALuint val)
{ return (ALfloat)((ALint)(val-2147483648u) * (1.0/2147483647.0)); }
-static __inline ALfloat Conv_ALfloat_ALfloat(ALfloat val)
+static inline ALfloat Conv_ALfloat_ALfloat(ALfloat val)
{ return (val==val) ? val : 0.0f; }
-static __inline ALfloat Conv_ALfloat_ALdouble(ALdouble val)
+static inline ALfloat Conv_ALfloat_ALdouble(ALdouble val)
{ return (val==val) ? (ALfloat)val : 0.0f; }
-static __inline ALfloat Conv_ALfloat_ALmulaw(ALmulaw val)
+static inline ALfloat Conv_ALfloat_ALmulaw(ALmulaw val)
{ return Conv_ALfloat_ALshort(DecodeMuLaw(val)); }
-static __inline ALfloat Conv_ALfloat_ALalaw(ALalaw val)
+static inline ALfloat Conv_ALfloat_ALalaw(ALalaw val)
{ return Conv_ALfloat_ALshort(DecodeALaw(val)); }
-static __inline ALfloat Conv_ALfloat_ALbyte3(ALbyte3 val)
+static inline ALfloat Conv_ALfloat_ALbyte3(ALbyte3 val)
{ return (ALfloat)(DecodeByte3(val) * (1.0/8388607.0)); }
-static __inline ALfloat Conv_ALfloat_ALubyte3(ALubyte3 val)
+static inline ALfloat Conv_ALfloat_ALubyte3(ALubyte3 val)
{ return (ALfloat)((DecodeUByte3(val)-8388608) * (1.0/8388607.0)); }
-static __inline ALdouble Conv_ALdouble_ALbyte(ALbyte val)
+static inline ALdouble Conv_ALdouble_ALbyte(ALbyte val)
{ return val * (1.0/127.0); }
-static __inline ALdouble Conv_ALdouble_ALubyte(ALubyte val)
+static inline ALdouble Conv_ALdouble_ALubyte(ALubyte val)
{ return (val-128) * (1.0/127.0); }
-static __inline ALdouble Conv_ALdouble_ALshort(ALshort val)
+static inline ALdouble Conv_ALdouble_ALshort(ALshort val)
{ return val * (1.0/32767.0); }
-static __inline ALdouble Conv_ALdouble_ALushort(ALushort val)
+static inline ALdouble Conv_ALdouble_ALushort(ALushort val)
{ return (val-32768) * (1.0/32767.0); }
-static __inline ALdouble Conv_ALdouble_ALint(ALint val)
+static inline ALdouble Conv_ALdouble_ALint(ALint val)
{ return val * (1.0/2147483647.0); }
-static __inline ALdouble Conv_ALdouble_ALuint(ALuint val)
+static inline ALdouble Conv_ALdouble_ALuint(ALuint val)
{ return (ALint)(val-2147483648u) * (1.0/2147483647.0); }
-static __inline ALdouble Conv_ALdouble_ALfloat(ALfloat val)
+static inline ALdouble Conv_ALdouble_ALfloat(ALfloat val)
{ return (val==val) ? val : 0.0f; }
-static __inline ALdouble Conv_ALdouble_ALdouble(ALdouble val)
+static inline ALdouble Conv_ALdouble_ALdouble(ALdouble val)
{ return (val==val) ? val : 0.0; }
-static __inline ALdouble Conv_ALdouble_ALmulaw(ALmulaw val)
+static inline ALdouble Conv_ALdouble_ALmulaw(ALmulaw val)
{ return Conv_ALdouble_ALshort(DecodeMuLaw(val)); }
-static __inline ALdouble Conv_ALdouble_ALalaw(ALalaw val)
+static inline ALdouble Conv_ALdouble_ALalaw(ALalaw val)
{ return Conv_ALdouble_ALshort(DecodeALaw(val)); }
-static __inline ALdouble Conv_ALdouble_ALbyte3(ALbyte3 val)
+static inline ALdouble Conv_ALdouble_ALbyte3(ALbyte3 val)
{ return DecodeByte3(val) * (1.0/8388607.0); }
-static __inline ALdouble Conv_ALdouble_ALubyte3(ALubyte3 val)
+static inline ALdouble Conv_ALdouble_ALubyte3(ALubyte3 val)
{ return (DecodeUByte3(val)-8388608) * (1.0/8388607.0); }
#define DECL_TEMPLATE(T) \
-static __inline ALmulaw Conv_ALmulaw_##T(T val) \
+static inline ALmulaw Conv_ALmulaw_##T(T val) \
{ return EncodeMuLaw(Conv_ALshort_##T(val)); }
DECL_TEMPLATE(ALbyte)
@@ -1505,7 +1505,7 @@ DECL_TEMPLATE(ALint)
DECL_TEMPLATE(ALuint)
DECL_TEMPLATE(ALfloat)
DECL_TEMPLATE(ALdouble)
-static __inline ALmulaw Conv_ALmulaw_ALmulaw(ALmulaw val)
+static inline ALmulaw Conv_ALmulaw_ALmulaw(ALmulaw val)
{ return val; }
DECL_TEMPLATE(ALalaw)
DECL_TEMPLATE(ALbyte3)
@@ -1514,7 +1514,7 @@ DECL_TEMPLATE(ALubyte3)
#undef DECL_TEMPLATE
#define DECL_TEMPLATE(T) \
-static __inline ALalaw Conv_ALalaw_##T(T val) \
+static inline ALalaw Conv_ALalaw_##T(T val) \
{ return EncodeALaw(Conv_ALshort_##T(val)); }
DECL_TEMPLATE(ALbyte)
@@ -1526,7 +1526,7 @@ DECL_TEMPLATE(ALuint)
DECL_TEMPLATE(ALfloat)
DECL_TEMPLATE(ALdouble)
DECL_TEMPLATE(ALmulaw)
-static __inline ALalaw Conv_ALalaw_ALalaw(ALalaw val)
+static inline ALalaw Conv_ALalaw_ALalaw(ALalaw val)
{ return val; }
DECL_TEMPLATE(ALbyte3)
DECL_TEMPLATE(ALubyte3)
@@ -1534,7 +1534,7 @@ DECL_TEMPLATE(ALubyte3)
#undef DECL_TEMPLATE
#define DECL_TEMPLATE(T) \
-static __inline ALbyte3 Conv_ALbyte3_##T(T val) \
+static inline ALbyte3 Conv_ALbyte3_##T(T val) \
{ return EncodeByte3(Conv_ALint_##T(val)>>8); }
DECL_TEMPLATE(ALbyte)
@@ -1547,14 +1547,14 @@ DECL_TEMPLATE(ALfloat)
DECL_TEMPLATE(ALdouble)
DECL_TEMPLATE(ALmulaw)
DECL_TEMPLATE(ALalaw)
-static __inline ALbyte3 Conv_ALbyte3_ALbyte3(ALbyte3 val)
+static inline ALbyte3 Conv_ALbyte3_ALbyte3(ALbyte3 val)
{ return val; }
DECL_TEMPLATE(ALubyte3)
#undef DECL_TEMPLATE
#define DECL_TEMPLATE(T) \
-static __inline ALubyte3 Conv_ALubyte3_##T(T val) \
+static inline ALubyte3 Conv_ALubyte3_##T(T val) \
{ return EncodeUByte3(Conv_ALuint_##T(val)>>8); }
DECL_TEMPLATE(ALbyte)
@@ -1568,7 +1568,7 @@ DECL_TEMPLATE(ALdouble)
DECL_TEMPLATE(ALmulaw)
DECL_TEMPLATE(ALalaw)
DECL_TEMPLATE(ALbyte3)
-static __inline ALubyte3 Conv_ALubyte3_ALubyte3(ALubyte3 val)
+static inline ALubyte3 Conv_ALubyte3_ALubyte3(ALubyte3 val)
{ return val; }
#undef DECL_TEMPLATE