Don't lock the context while checking the validity of objects
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
+2
-2
@@ -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;
|
||||
}
|
||||
|
||||
+2
-2
@@ -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;
|
||||
}
|
||||
|
||||
+2
-2
@@ -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;
|
||||
}
|
||||
|
||||
+2
-2
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user