From d546813c05583dc083e11e6be4c38555e6561c18 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 30 Aug 2011 00:04:02 -0700 Subject: Don't lock the context while checking the validity of objects --- OpenAL32/alAuxEffectSlot.c | 4 ++-- OpenAL32/alBuffer.c | 4 ++-- OpenAL32/alEffect.c | 4 ++-- OpenAL32/alFilter.c | 4 ++-- OpenAL32/alSource.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) (limited to 'OpenAL32') diff --git a/OpenAL32/alAuxEffectSlot.c b/OpenAL32/alAuxEffectSlot.c index f34f4d09..4645ed2b 100644 --- a/OpenAL32/alAuxEffectSlot.c +++ b/OpenAL32/alAuxEffectSlot.c @@ -161,13 +161,13 @@ AL_API ALboolean AL_APIENTRY alIsAuxiliaryEffectSlot(ALuint effectslot) ALCcontext *Context; ALboolean result; - Context = GetLockedContext(); + Context = GetReffedContext(); if(!Context) return AL_FALSE; result = (LookupEffectSlot(Context->EffectSlotMap, effectslot) ? AL_TRUE : AL_FALSE); - UnlockContext(Context); + ALCcontext_DecRef(Context); return result; } diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c index ebcd4724..dde7f0af 100644 --- a/OpenAL32/alBuffer.c +++ b/OpenAL32/alBuffer.c @@ -265,13 +265,13 @@ AL_API ALboolean AL_APIENTRY alIsBuffer(ALuint buffer) ALCcontext *Context; ALboolean result; - Context = GetLockedContext(); + Context = GetReffedContext(); if(!Context) return AL_FALSE; result = ((!buffer || LookupBuffer(Context->Device->BufferMap, buffer)) ? AL_TRUE : AL_FALSE); - UnlockContext(Context); + ALCcontext_DecRef(Context); return result; } diff --git a/OpenAL32/alEffect.c b/OpenAL32/alEffect.c index 51ebba0b..3bd689a8 100644 --- a/OpenAL32/alEffect.c +++ b/OpenAL32/alEffect.c @@ -143,13 +143,13 @@ AL_API ALboolean AL_APIENTRY alIsEffect(ALuint effect) ALCcontext *Context; ALboolean result; - Context = GetLockedContext(); + Context = GetReffedContext(); if(!Context) return AL_FALSE; result = ((!effect || LookupEffect(Context->Device->EffectMap, effect)) ? AL_TRUE : AL_FALSE); - UnlockContext(Context); + ALCcontext_DecRef(Context); return result; } diff --git a/OpenAL32/alFilter.c b/OpenAL32/alFilter.c index 995d1851..6b3f8620 100644 --- a/OpenAL32/alFilter.c +++ b/OpenAL32/alFilter.c @@ -139,13 +139,13 @@ AL_API ALboolean AL_APIENTRY alIsFilter(ALuint filter) ALCcontext *Context; ALboolean result; - Context = GetLockedContext(); + Context = GetReffedContext(); if(!Context) return AL_FALSE; result = ((!filter || LookupFilter(Context->Device->FilterMap, filter)) ? AL_TRUE : AL_FALSE); - UnlockContext(Context); + ALCcontext_DecRef(Context); return result; } diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index 9d4f048c..1ce6b95f 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -192,12 +192,12 @@ AL_API ALboolean AL_APIENTRY alIsSource(ALuint source) ALCcontext *Context; ALboolean result; - Context = GetLockedContext(); + Context = GetReffedContext(); if(!Context) return AL_FALSE; result = (LookupSource(Context->SourceMap, source) ? AL_TRUE : AL_FALSE); - UnlockContext(Context); + ALCcontext_DecRef(Context); return result; } -- cgit v1.2.3