From 7d73ac440552babe27395a7985ff3f693303c61b Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 16 Jun 2011 09:14:41 -0700 Subject: Avoid calling some AL functions from under the context lock There are still some more occurances to clear out (deletion in gen error, effects, some filters), which shall be coming up. There is a possibility for a deadlock between the listlock and the global/context lock, if another attempt to get the listlock is made while under the context lock. --- OpenAL32/alBuffer.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'OpenAL32/alBuffer.c') diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c index 36ec3aeb..ac3a85af 100644 --- a/OpenAL32/alBuffer.c +++ b/OpenAL32/alBuffer.c @@ -921,6 +921,16 @@ AL_API void AL_APIENTRY alGetBufferiv(ALuint buffer, ALenum eParam, ALint* plVal ALCdevice *device; ALbuffer *ALBuf; + switch(eParam) + { + case AL_FREQUENCY: + case AL_BITS: + case AL_CHANNELS: + case AL_SIZE: + alGetBufferi(buffer, eParam, plValues); + return; + } + pContext = GetContextSuspended(); if(!pContext) return; @@ -933,13 +943,6 @@ AL_API void AL_APIENTRY alGetBufferiv(ALuint buffer, ALenum eParam, ALint* plVal { switch(eParam) { - case AL_FREQUENCY: - case AL_BITS: - case AL_CHANNELS: - case AL_SIZE: - alGetBufferi(buffer, eParam, plValues); - break; - case AL_LOOP_POINTS_SOFT: plValues[0] = ALBuf->LoopStart; plValues[1] = ALBuf->LoopEnd; -- cgit v1.2.3