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.
This commit is contained in:
parent
812d91cbf8
commit
e80aa008b2
1187
Alc/alcReverb.c
1187
Alc/alcReverb.c
File diff suppressed because it is too large
Load Diff
@ -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);
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user