diff options
author | Chris Robinson <[email protected]> | 2011-05-29 02:56:00 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-05-29 02:56:00 -0700 |
commit | 60a55aa89714e06d547b294ae71902a72fef59c4 (patch) | |
tree | 159eb36f7849baf6785e2b9f31dbd877993089d5 | |
parent | 9325a78043df57d393135673ad40022f3d0e2b93 (diff) |
Hold the global lock while the device is being updated
-rw-r--r-- | Alc/ALc.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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; } |