From 60a55aa89714e06d547b294ae71902a72fef59c4 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 29 May 2011 02:56:00 -0700 Subject: Hold the global lock while the device is being updated --- Alc/ALc.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Alc/ALc.c') diff --git a/Alc/ALc.c b/Alc/ALc.c index 42e8e9c3..46177332 100644 --- a/Alc/ALc.c +++ b/Alc/ALc.c @@ -1199,8 +1199,13 @@ static ALCboolean UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) if(running) return ALC_TRUE; + + SuspendContext(NULL); if(ALCdevice_ResetPlayback(device) == ALC_FALSE) + { + ProcessContext(NULL); return ALC_FALSE; + } aluInitPanning(device); @@ -1262,6 +1267,7 @@ static ALCboolean UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) if(ALEffect_DeviceUpdate(slot->EffectState, device) == AL_FALSE) { ProcessContext(context); + ProcessContext(NULL); return ALC_FALSE; } ALEffect_Update(slot->EffectState, context, &slot->effect); @@ -1285,6 +1291,7 @@ static ALCboolean UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) } ProcessContext(context); } + ProcessContext(NULL); return ALC_TRUE; } -- cgit v1.2.3