aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-01-27 11:56:31 -0800
committerChris Robinson <[email protected]>2018-01-27 14:34:05 -0800
commit38261a0f2a5a17683ce90cbe86267669717a6df0 (patch)
tree16ccb5c42ddba0fef5c5e0c2a6aec62bd02a0af9
parentc4a76af3978715315603bd967ac688509b074775 (diff)
Make some more functions static where they're used
-rw-r--r--OpenAL32/Include/alSource.h14
-rw-r--r--OpenAL32/alSource.c21
2 files changed, 14 insertions, 21 deletions
diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h
index 970ea07c..b346e619 100644
--- a/OpenAL32/Include/alSource.h
+++ b/OpenAL32/Include/alSource.h
@@ -104,20 +104,6 @@ typedef struct ALsource {
ALuint id;
} ALsource;
-inline void LockSourcesRead(ALCcontext *context)
-{ LockUIntMapRead(&context->SourceMap); }
-inline void UnlockSourcesRead(ALCcontext *context)
-{ UnlockUIntMapRead(&context->SourceMap); }
-inline void LockSourcesWrite(ALCcontext *context)
-{ LockUIntMapWrite(&context->SourceMap); }
-inline void UnlockSourcesWrite(ALCcontext *context)
-{ UnlockUIntMapWrite(&context->SourceMap); }
-
-inline struct ALsource *LookupSource(ALCcontext *context, ALuint id)
-{ return (struct ALsource*)LookupUIntMapKeyNoLock(&context->SourceMap, id); }
-inline struct ALsource *RemoveSource(ALCcontext *context, ALuint id)
-{ return (struct ALsource*)RemoveUIntMapKeyNoLock(&context->SourceMap, id); }
-
void UpdateAllSourceProps(ALCcontext *context);
ALvoid ReleaseALSources(ALCcontext *Context);
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index 17d57852..b5f8a94f 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -40,13 +40,6 @@
#include "almalloc.h"
-extern inline void LockSourcesRead(ALCcontext *context);
-extern inline void UnlockSourcesRead(ALCcontext *context);
-extern inline void LockSourcesWrite(ALCcontext *context);
-extern inline void UnlockSourcesWrite(ALCcontext *context);
-extern inline struct ALsource *LookupSource(ALCcontext *context, ALuint id);
-extern inline struct ALsource *RemoveSource(ALCcontext *context, ALuint id);
-
static void InitSourceParams(ALsource *Source, ALsizei num_sends);
static void DeinitSource(ALsource *source, ALsizei num_sends);
static void UpdateSourceProps(ALsource *source, ALvoice *voice, ALsizei num_sends, ALCcontext *context);
@@ -56,6 +49,20 @@ static ALdouble GetSourceOffset(ALsource *Source, ALenum name, ALCcontext *conte
static ALboolean GetSampleOffset(ALsource *Source, ALuint *offset, ALsizei *frac);
static ALboolean ApplyOffset(ALsource *Source, ALvoice *voice);
+static inline void LockSourcesRead(ALCcontext *context)
+{ LockUIntMapRead(&context->SourceMap); }
+static inline void UnlockSourcesRead(ALCcontext *context)
+{ UnlockUIntMapRead(&context->SourceMap); }
+static inline void LockSourcesWrite(ALCcontext *context)
+{ LockUIntMapWrite(&context->SourceMap); }
+static inline void UnlockSourcesWrite(ALCcontext *context)
+{ UnlockUIntMapWrite(&context->SourceMap); }
+
+static inline ALsource *LookupSource(ALCcontext *context, ALuint id)
+{ return (ALsource*)LookupUIntMapKeyNoLock(&context->SourceMap, id); }
+static inline ALsource *RemoveSource(ALCcontext *context, ALuint id)
+{ return (ALsource*)RemoveUIntMapKeyNoLock(&context->SourceMap, id); }
+
static inline ALbuffer *LookupBuffer(ALCdevice *device, ALuint id)
{
BufferSubList *sublist;