diff options
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r-- | OpenAL32/Include/alMain.h | 34 | ||||
-rw-r--r-- | OpenAL32/Include/alu.h | 36 |
2 files changed, 35 insertions, 35 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 78528e6e..13e11446 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -145,8 +145,8 @@ struct Hrtf; #define MIN_OUTPUT_RATE (8000) -// Find the next power-of-2 for non-power-of-2 numbers. -static inline ALuint NextPowerOf2(ALuint value) +/* Find the next power-of-2 for non-power-of-2 numbers. */ +inline ALuint NextPowerOf2(ALuint value) { if(value > 0) { @@ -162,7 +162,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) +inline ALint fastf2i(ALfloat f) { #ifdef HAVE_LRINTF return lrintf(f); @@ -178,7 +178,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) +inline ALuint fastf2u(ALfloat f) { return fastf2i(f); } @@ -304,7 +304,7 @@ enum DevFmtChannels { ALuint BytesFromDevFmt(enum DevFmtType type); ALuint ChannelsFromDevFmt(enum DevFmtChannels chans); -static inline ALuint FrameSizeFromDevFmt(enum DevFmtChannels chans, enum DevFmtType type) +inline ALuint FrameSizeFromDevFmt(enum DevFmtChannels chans, enum DevFmtType type) { return ChannelsFromDevFmt(chans) * BytesFromDevFmt(type); } @@ -432,18 +432,18 @@ struct ALCdevice_struct #define MIXER_THREAD_NAME "alsoft-mixer" -static inline struct ALbuffer *LookupBuffer(ALCdevice *device, ALuint id) +inline struct ALbuffer *LookupBuffer(ALCdevice *device, ALuint id) { return (struct ALbuffer*)LookupUIntMapKey(&device->BufferMap, id); } -static inline struct ALeffect *LookupEffect(ALCdevice *device, ALuint id) +inline struct ALeffect *LookupEffect(ALCdevice *device, ALuint id) { return (struct ALeffect*)LookupUIntMapKey(&device->EffectMap, id); } -static inline struct ALfilter *LookupFilter(ALCdevice *device, ALuint id) +inline struct ALfilter *LookupFilter(ALCdevice *device, ALuint id) { return (struct ALfilter*)LookupUIntMapKey(&device->FilterMap, id); } -static inline struct ALbuffer *RemoveBuffer(ALCdevice *device, ALuint id) +inline struct ALbuffer *RemoveBuffer(ALCdevice *device, ALuint id) { return (struct ALbuffer*)RemoveUIntMapKey(&device->BufferMap, id); } -static inline struct ALeffect *RemoveEffect(ALCdevice *device, ALuint id) +inline struct ALeffect *RemoveEffect(ALCdevice *device, ALuint id) { return (struct ALeffect*)RemoveUIntMapKey(&device->EffectMap, id); } -static inline struct ALfilter *RemoveFilter(ALCdevice *device, ALuint id) +inline struct ALfilter *RemoveFilter(ALCdevice *device, ALuint id) { return (struct ALfilter*)RemoveUIntMapKey(&device->FilterMap, id); } @@ -482,14 +482,14 @@ struct ALCcontext_struct ALCcontext *volatile next; }; -static inline struct ALsource *LookupSource(ALCcontext *context, ALuint id) +inline struct ALsource *LookupSource(ALCcontext *context, ALuint id) { return (struct ALsource*)LookupUIntMapKey(&context->SourceMap, id); } -static inline struct ALeffectslot *LookupEffectSlot(ALCcontext *context, ALuint id) +inline struct ALeffectslot *LookupEffectSlot(ALCcontext *context, ALuint id) { return (struct ALeffectslot*)LookupUIntMapKey(&context->EffectSlotMap, id); } -static inline struct ALsource *RemoveSource(ALCcontext *context, ALuint id) +inline struct ALsource *RemoveSource(ALCcontext *context, ALuint id) { return (struct ALsource*)RemoveUIntMapKey(&context->SourceMap, id); } -static inline struct ALeffectslot *RemoveEffectSlot(ALCcontext *context, ALuint id) +inline struct ALeffectslot *RemoveEffectSlot(ALCcontext *context, ALuint id) { return (struct ALeffectslot*)RemoveUIntMapKey(&context->EffectSlotMap, id); } @@ -509,10 +509,10 @@ void ALCdevice_Lock(ALCdevice *device); void ALCdevice_Unlock(ALCdevice *device); ALint64 ALCdevice_GetLatency(ALCdevice *device); -static inline void LockContext(ALCcontext *context) +inline void LockContext(ALCcontext *context) { ALCdevice_Lock(context->Device); } -static inline void UnlockContext(ALCcontext *context) +inline void UnlockContext(ALCcontext *context) { ALCdevice_Unlock(context->Device); } 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); } |