aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alAuxEffectSlot.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-09-01 20:06:51 -0700
committerChris Robinson <[email protected]>2011-09-01 20:06:51 -0700
commite80aa008b2f843869941645baecb3352376ed3e8 (patch)
tree5bd5cef8b9d17c6d5ccc0046a32a3b42973b769b /OpenAL32/alAuxEffectSlot.c
parent812d91cbf823fcf2ce83c0955c6aa99689c3dc6e (diff)
Combine the reverb effects
Updating and processing still differs depending on whether standard or EAX reverb is used or not. The only functional difference should be that the allocated buffer (and subsequent offsets) take into account the modulation and echo times.
Diffstat (limited to 'OpenAL32/alAuxEffectSlot.c')
-rw-r--r--OpenAL32/alAuxEffectSlot.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/OpenAL32/alAuxEffectSlot.c b/OpenAL32/alAuxEffectSlot.c
index 8d51569b..5cca2a51 100644
--- a/OpenAL32/alAuxEffectSlot.c
+++ b/OpenAL32/alAuxEffectSlot.c
@@ -530,15 +530,13 @@ static ALvoid InitializeEffect(ALCcontext *Context, ALeffectslot *EffectSlot, AL
NewState = NoneCreate();
if(!NewState) err = AL_OUT_OF_MEMORY;
}
- else if(newtype == AL_EFFECT_EAXREVERB && EffectSlot->effect.type != AL_EFFECT_EAXREVERB)
+ else if(newtype == AL_EFFECT_EAXREVERB || newtype == AL_EFFECT_REVERB)
{
- NewState = EAXVerbCreate();
- if(!NewState) err = AL_OUT_OF_MEMORY;
- }
- else if(newtype == AL_EFFECT_REVERB && EffectSlot->effect.type != AL_EFFECT_REVERB)
- {
- NewState = VerbCreate();
- if(!NewState) err = AL_OUT_OF_MEMORY;
+ if(EffectSlot->effect.type != AL_EFFECT_EAXREVERB && EffectSlot->effect.type != AL_EFFECT_REVERB)
+ {
+ NewState = ReverbCreate();
+ if(!NewState) err = AL_OUT_OF_MEMORY;
+ }
}
else if(newtype == AL_EFFECT_ECHO && EffectSlot->effect.type != AL_EFFECT_ECHO)
{
@@ -550,11 +548,13 @@ static ALvoid InitializeEffect(ALCcontext *Context, ALeffectslot *EffectSlot, AL
NewState = ModulatorCreate();
if(!NewState) err = AL_OUT_OF_MEMORY;
}
- else if((newtype == AL_EFFECT_DEDICATED_DIALOGUE || newtype == AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT) &&
- EffectSlot->effect.type != AL_EFFECT_DEDICATED_DIALOGUE && EffectSlot->effect.type != AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT)
+ else if(newtype == AL_EFFECT_DEDICATED_DIALOGUE || newtype == AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT)
{
- NewState = DedicatedCreate();
- if(!NewState) err = AL_OUT_OF_MEMORY;
+ if(EffectSlot->effect.type != AL_EFFECT_DEDICATED_DIALOGUE && EffectSlot->effect.type != AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT)
+ {
+ NewState = DedicatedCreate();
+ if(!NewState) err = AL_OUT_OF_MEMORY;
+ }
}
if(err != AL_NO_ERROR)