Use the previous low-pass filter again, as it seems to match the intended output better

This commit is contained in:
Chris Robinson 2008-01-15 18:29:21 -08:00
parent 7b1b8bd741
commit 03ca50fa70

View File

@ -217,9 +217,13 @@ static __inline ALfloat aluComputeDrySample(ALsource *source, ALfloat DryGainHF,
{ {
if(DryGainHF < 1.0f) if(DryGainHF < 1.0f)
{ {
ALfloat u = sample + source->LastDrySample; if(DryGainHF > 0.0f)
ALfloat v = sample - source->LastDrySample; {
sample = (u + (v*DryGainHF)) * 0.5; sample *= DryGainHF;
sample += source->LastDrySample * (1.0f-DryGainHF);
}
else
sample = 0.0f;
} }
source->LastDrySample = sample; source->LastDrySample = sample;
@ -230,9 +234,13 @@ static __inline ALfloat aluComputeWetSample(ALsource *source, ALfloat WetGainHF,
{ {
if(WetGainHF < 1.0f) if(WetGainHF < 1.0f)
{ {
ALfloat u = sample + source->LastWetSample; if(WetGainHF > 0.0f)
ALfloat v = sample - source->LastWetSample; {
sample = (u + (v*WetGainHF)) * 0.5; sample *= WetGainHF;
sample += source->LastWetSample * (1.0f-WetGainHF);
}
else
sample = 0.0f;
} }
source->LastWetSample = sample; source->LastWetSample = sample;