diff options
author | Chris Robinson <[email protected]> | 2016-05-27 19:40:54 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-05-27 19:40:54 -0700 |
commit | 800e38bac68315d372ca1f865c7c448356309f70 (patch) | |
tree | 5b7f867e3ba2fe252bb82da96aa84dd7edc8d9a5 /OpenAL32/alAuxEffectSlot.c | |
parent | c837484015e186076165515882beec389f02a987 (diff) |
Use the backend lock for the effectstate's deviceUpdate call
Diffstat (limited to 'OpenAL32/alAuxEffectSlot.c')
-rw-r--r-- | OpenAL32/alAuxEffectSlot.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/OpenAL32/alAuxEffectSlot.c b/OpenAL32/alAuxEffectSlot.c index 9cc86563..c37ecd58 100644 --- a/OpenAL32/alAuxEffectSlot.c +++ b/OpenAL32/alAuxEffectSlot.c @@ -470,24 +470,20 @@ ALenum InitializeEffect(ALCdevice *Device, ALeffectslot *EffectSlot, ALeffect *e return AL_INVALID_ENUM; } State = V0(factory,create)(); - if(!State) - return AL_OUT_OF_MEMORY; + if(!State) return AL_OUT_OF_MEMORY; SetMixerFPUMode(&oldMode); - /* FIXME: This just needs to prevent the device from being reset during - * the state's device update, so the list lock in ALc.c should do here. - */ - ALCdevice_Lock(Device); + almtx_lock(&Device->BackendLock); State->OutBuffer = Device->Dry.Buffer; State->OutChannels = Device->Dry.NumChannels; if(V(State,deviceUpdate)(Device) == AL_FALSE) { - ALCdevice_Unlock(Device); + almtx_unlock(&Device->BackendLock); RestoreFPUMode(&oldMode); DELETE_OBJ(State); return AL_OUT_OF_MEMORY; } - ALCdevice_Unlock(Device); + almtx_unlock(&Device->BackendLock); RestoreFPUMode(&oldMode); if(!effect) |