Don't lock the context while checking the validity of objects

This commit is contained in:
Chris Robinson
2011-08-30 00:04:02 -07:00
parent f02d9e22d7
commit d546813c05
5 changed files with 10 additions and 10 deletions
+2 -2
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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;
}