aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alAuxEffectSlot.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-10-20 08:31:44 -0700
committerChris Robinson <[email protected]>2009-10-20 08:31:44 -0700
commitf14cf8289eae832b090c4067ae66a19be08b7029 (patch)
tree72429089a328f49f494f9234bad41cf23d99a534 /OpenAL32/alAuxEffectSlot.c
parent790aa686214559377c4ec398762c1e7cd655f8a5 (diff)
Add a method to update device-dependant effect parameters.
The effect state's update method will be called afterwards
Diffstat (limited to 'OpenAL32/alAuxEffectSlot.c')
-rw-r--r--OpenAL32/alAuxEffectSlot.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/OpenAL32/alAuxEffectSlot.c b/OpenAL32/alAuxEffectSlot.c
index 1fd2f707..7a9c6326 100644
--- a/OpenAL32/alAuxEffectSlot.c
+++ b/OpenAL32/alAuxEffectSlot.c
@@ -428,8 +428,13 @@ static ALvoid InitializeEffect(ALCcontext *Context, ALeffectslot *ALEffectSlot,
else if(effect->type == AL_EFFECT_ECHO)
NewState = EchoCreate();
/* No new state? An error occured.. */
- if(!NewState)
+ if(NewState == NULL ||
+ ALEffect_DeviceUpdate(NewState, Context->Device) == AL_FALSE)
+ {
+ if(NewState)
+ ALEffect_Destroy(NewState);
return;
+ }
}
if(ALEffectSlot->EffectState)
ALEffect_Destroy(ALEffectSlot->EffectState);