diff options
author | Chris Robinson <[email protected]> | 2018-01-27 11:56:31 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-01-27 14:34:05 -0800 |
commit | 38261a0f2a5a17683ce90cbe86267669717a6df0 (patch) | |
tree | 16ccb5c42ddba0fef5c5e0c2a6aec62bd02a0af9 /OpenAL32/alSource.c | |
parent | c4a76af3978715315603bd967ac688509b074775 (diff) |
Make some more functions static where they're used
Diffstat (limited to 'OpenAL32/alSource.c')
-rw-r--r-- | OpenAL32/alSource.c | 21 |
1 files changed, 14 insertions, 7 deletions
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; |