diff options
-rw-r--r-- | OpenAL32/Include/alBuffer.h | 12 | ||||
-rw-r--r-- | OpenAL32/alBuffer.c | 13 |
2 files changed, 12 insertions, 13 deletions
diff --git a/OpenAL32/Include/alBuffer.h b/OpenAL32/Include/alBuffer.h index b6d77436..50946126 100644 --- a/OpenAL32/Include/alBuffer.h +++ b/OpenAL32/Include/alBuffer.h @@ -109,15 +109,9 @@ inline void LockBuffersRead(ALCdevice *device) { LockUIntMapRead(&device->BufferMap); } inline void UnlockBuffersRead(ALCdevice *device) { UnlockUIntMapRead(&device->BufferMap); } -inline void LockBuffersWrite(ALCdevice *device) -{ LockUIntMapWrite(&device->BufferMap); } -inline void UnlockBuffersWrite(ALCdevice *device) -{ UnlockUIntMapWrite(&device->BufferMap); } - -inline struct ALbuffer *LookupBuffer(ALCdevice *device, ALuint id) -{ return (struct ALbuffer*)LookupUIntMapKeyNoLock(&device->BufferMap, id); } -inline struct ALbuffer *RemoveBuffer(ALCdevice *device, ALuint id) -{ return (struct ALbuffer*)RemoveUIntMapKeyNoLock(&device->BufferMap, id); } + +inline ALbuffer *LookupBuffer(ALCdevice *device, ALuint id) +{ return (ALbuffer*)LookupUIntMapKeyNoLock(&device->BufferMap, id); } ALvoid ReleaseALBuffers(ALCdevice *device); diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c index f692ca11..985fa6eb 100644 --- a/OpenAL32/alBuffer.c +++ b/OpenAL32/alBuffer.c @@ -38,10 +38,7 @@ extern inline void LockBuffersRead(ALCdevice *device); extern inline void UnlockBuffersRead(ALCdevice *device); -extern inline void LockBuffersWrite(ALCdevice *device); -extern inline void UnlockBuffersWrite(ALCdevice *device); -extern inline struct ALbuffer *LookupBuffer(ALCdevice *device, ALuint id); -extern inline struct ALbuffer *RemoveBuffer(ALCdevice *device, ALuint id); +extern inline ALbuffer *LookupBuffer(ALCdevice *device, ALuint id); extern inline ALsizei FrameSizeFromUserFmt(enum UserFmtChannels chans, enum UserFmtType type); extern inline ALsizei FrameSizeFromFmt(enum FmtChannels chans, enum FmtType type); @@ -52,6 +49,14 @@ static void LoadData(ALCcontext *context, ALbuffer *buffer, ALuint freq, ALsizei static ALboolean DecomposeUserFormat(ALenum format, enum UserFmtChannels *chans, enum UserFmtType *type); static ALsizei SanitizeAlignment(enum UserFmtType type, ALsizei align); +static inline void LockBuffersWrite(ALCdevice *device) +{ LockUIntMapWrite(&device->BufferMap); } +static inline void UnlockBuffersWrite(ALCdevice *device) +{ UnlockUIntMapWrite(&device->BufferMap); } + +static inline ALbuffer *RemoveBuffer(ALCdevice *device, ALuint id) +{ return (ALbuffer*)RemoveUIntMapKeyNoLock(&device->BufferMap, id); } + #define INVALID_STORAGE_MASK ~(AL_MAP_READ_BIT_SOFT | AL_MAP_WRITE_BIT_SOFT | AL_PRESERVE_DATA_BIT_SOFT | AL_MAP_PERSISTENT_BIT_SOFT) #define MAP_READ_WRITE_FLAGS (AL_MAP_READ_BIT_SOFT | AL_MAP_WRITE_BIT_SOFT) |