aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-11-04 12:12:31 -0800
committerChris Robinson <[email protected]>2013-11-04 12:12:31 -0800
commit551f893ae910c2b1b72c0a22aeab1ede75d3e5ed (patch)
tree1f41eaee75fdfd0d9cc1e0bfff8bce3bd7039aba /OpenAL32
parent692ab1085dd75c0ac696f3effe61bc9223181547 (diff)
Use C99 inline semantics
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alBuffer.h5
-rw-r--r--OpenAL32/Include/alEffect.h2
-rw-r--r--OpenAL32/Include/alFilter.h4
-rw-r--r--OpenAL32/alBuffer.c3
-rw-r--r--OpenAL32/alEffect.c1
-rw-r--r--OpenAL32/alFilter.c3
6 files changed, 12 insertions, 6 deletions
diff --git a/OpenAL32/Include/alBuffer.h b/OpenAL32/Include/alBuffer.h
index 358b3c9f..547768d6 100644
--- a/OpenAL32/Include/alBuffer.h
+++ b/OpenAL32/Include/alBuffer.h
@@ -35,8 +35,7 @@ enum UserFmtChannels {
ALuint BytesFromUserFmt(enum UserFmtType type);
ALuint ChannelsFromUserFmt(enum UserFmtChannels chans);
-static inline ALuint FrameSizeFromUserFmt(enum UserFmtChannels chans,
- enum UserFmtType type)
+inline ALuint FrameSizeFromUserFmt(enum UserFmtChannels chans, enum UserFmtType type)
{
return ChannelsFromUserFmt(chans) * BytesFromUserFmt(type);
}
@@ -61,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)
+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 772324cc..57e7a15f 100644
--- a/OpenAL32/Include/alEffect.h
+++ b/OpenAL32/Include/alEffect.h
@@ -177,7 +177,7 @@ typedef struct ALeffect {
ALuint id;
} ALeffect;
-static inline ALboolean IsReverbEffect(ALenum type)
+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 c8bdf906..91db5462 100644
--- a/OpenAL32/Include/alFilter.h
+++ b/OpenAL32/Include/alFilter.h
@@ -34,7 +34,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)
+inline ALfloat ALfilterState_processSingle(ALfilterState *filter, ALfloat sample)
{
ALfloat outsmp;
@@ -51,7 +51,7 @@ static inline ALfloat ALfilterState_processSingle(ALfilterState *filter, ALfloat
return outsmp;
}
-static inline ALfloat ALfilterState_processSingleC(const ALfilterState *filter, ALfloat sample)
+inline ALfloat ALfilterState_processSingleC(const ALfilterState *filter, ALfloat sample)
{
return filter->b[0] * sample +
filter->b[1] * filter->x[0] +
diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c
index fa02582a..51e9cc7c 100644
--- a/OpenAL32/alBuffer.c
+++ b/OpenAL32/alBuffer.c
@@ -32,6 +32,9 @@
#include "alThunk.h"
+extern inline ALuint FrameSizeFromUserFmt(enum UserFmtChannels chans, enum UserFmtType type);
+extern inline ALuint FrameSizeFromFmt(enum FmtChannels chans, enum FmtType type);
+
static ALenum LoadData(ALbuffer *ALBuf, ALuint freq, ALenum NewFormat, ALsizei frames, enum UserFmtChannels chans, enum UserFmtType type, const ALvoid *data, ALboolean storesrc);
static void ConvertData(ALvoid *dst, enum UserFmtType dstType, const ALvoid *src, enum UserFmtType srcType, ALsizei numchans, ALsizei len);
static ALboolean IsValidType(ALenum type);
diff --git a/OpenAL32/alEffect.c b/OpenAL32/alEffect.c
index 522226d7..1413ef6e 100644
--- a/OpenAL32/alEffect.c
+++ b/OpenAL32/alEffect.c
@@ -34,6 +34,7 @@
ALboolean DisabledEffects[MAX_EFFECTS];
+extern inline ALboolean IsReverbEffect(ALenum type);
static void InitEffectParams(ALeffect *effect, ALenum type);
diff --git a/OpenAL32/alFilter.c b/OpenAL32/alFilter.c
index 899ff5f0..85d411f0 100644
--- a/OpenAL32/alFilter.c
+++ b/OpenAL32/alFilter.c
@@ -29,6 +29,9 @@
#include "alError.h"
+extern inline ALfloat ALfilterState_processSingle(ALfilterState *filter, ALfloat sample);
+extern inline ALfloat ALfilterState_processSingleC(const ALfilterState *filter, ALfloat sample);
+
static void InitFilterParams(ALfilter *filter, ALenum type);