diff options
author | Chris Robinson <[email protected]> | 2016-05-12 23:12:11 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-05-12 23:12:11 -0700 |
commit | 9e6d8342de62df83377b19577268af7106cdc088 (patch) | |
tree | b60690e092a3c5d7de442273e8cfeafd814a0a72 /OpenAL32/Include/alEffect.h | |
parent | 8d14824c657a1471d08e175c8153909627313d70 (diff) |
Hold the effect and filter maps while handling effects and filters
Diffstat (limited to 'OpenAL32/Include/alEffect.h')
-rw-r--r-- | OpenAL32/Include/alEffect.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/OpenAL32/Include/alEffect.h b/OpenAL32/Include/alEffect.h index 91ee782f..d20ef077 100644 --- a/OpenAL32/Include/alEffect.h +++ b/OpenAL32/Include/alEffect.h @@ -176,10 +176,19 @@ typedef struct ALeffect { ALuint id; } ALeffect; +inline void LockEffectsRead(ALCdevice *device) +{ LockUIntMapRead(&device->EffectMap); } +inline void UnlockEffectsRead(ALCdevice *device) +{ UnlockUIntMapRead(&device->EffectMap); } +inline void LockEffectsWrite(ALCdevice *device) +{ LockUIntMapWrite(&device->EffectMap); } +inline void UnlockEffectsWrite(ALCdevice *device) +{ UnlockUIntMapWrite(&device->EffectMap); } + inline struct ALeffect *LookupEffect(ALCdevice *device, ALuint id) -{ return (struct ALeffect*)LookupUIntMapKey(&device->EffectMap, id); } +{ return (struct ALeffect*)LookupUIntMapKeyNoLock(&device->EffectMap, id); } inline struct ALeffect *RemoveEffect(ALCdevice *device, ALuint id) -{ return (struct ALeffect*)RemoveUIntMapKey(&device->EffectMap, id); } +{ return (struct ALeffect*)RemoveUIntMapKeyNoLock(&device->EffectMap, id); } inline ALboolean IsReverbEffect(ALenum type) { return type == AL_EFFECT_REVERB || type == AL_EFFECT_EAXREVERB; } |