diff options
author | Chris Robinson <[email protected]> | 2011-06-16 09:14:41 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-06-16 09:14:41 -0700 |
commit | 7d73ac440552babe27395a7985ff3f693303c61b (patch) | |
tree | 9d93807ba62608a62686172d9da58fc8d56de560 /OpenAL32/alBuffer.c | |
parent | c429a5be25978b2c0228af5cc448308110e7154c (diff) |
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.
Diffstat (limited to 'OpenAL32/alBuffer.c')
-rw-r--r-- | OpenAL32/alBuffer.c | 17 |
1 files changed, 10 insertions, 7 deletions
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; |