From 38261a0f2a5a17683ce90cbe86267669717a6df0 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 27 Jan 2018 11:56:31 -0800 Subject: Make some more functions static where they're used --- OpenAL32/Include/alSource.h | 14 -------------- OpenAL32/alSource.c | 21 ++++++++++++++------- 2 files changed, 14 insertions(+), 21 deletions(-) (limited to 'OpenAL32') 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; -- cgit v1.2.3