diff options
author | Chris Robinson <[email protected]> | 2011-09-01 20:06:51 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-09-01 20:06:51 -0700 |
commit | e80aa008b2f843869941645baecb3352376ed3e8 (patch) | |
tree | 5bd5cef8b9d17c6d5ccc0046a32a3b42973b769b /OpenAL32 | |
parent | 812d91cbf823fcf2ce83c0955c6aa99689c3dc6e (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')
-rw-r--r-- | OpenAL32/Include/alAuxEffectSlot.h | 3 | ||||
-rw-r--r-- | OpenAL32/alAuxEffectSlot.c | 24 |
2 files changed, 13 insertions, 14 deletions
diff --git a/OpenAL32/Include/alAuxEffectSlot.h b/OpenAL32/Include/alAuxEffectSlot.h index 28d890cc..b7fe3b4c 100644 --- a/OpenAL32/Include/alAuxEffectSlot.h +++ b/OpenAL32/Include/alAuxEffectSlot.h @@ -46,8 +46,7 @@ struct ALeffectState { }; ALeffectState *NoneCreate(void); -ALeffectState *EAXVerbCreate(void); -ALeffectState *VerbCreate(void); +ALeffectState *ReverbCreate(void); ALeffectState *EchoCreate(void); ALeffectState *ModulatorCreate(void); ALeffectState *DedicatedCreate(void); 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) |