diff options
author | Chris Robinson <[email protected]> | 2008-11-18 03:26:02 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2008-11-18 03:26:02 -0800 |
commit | 13a2e6ef1f23e575606bfe1f65b9613e6e55aa68 (patch) | |
tree | 84dd7845486ac464d4fc8f144e63f2b25bc5bc2b /Alc/alcReverb.c | |
parent | 0ecb34b8505f8bcb065b56dbc0ec489f977c10ae (diff) |
Don't calculate reverb HF limit if air absorption is 1
Diffstat (limited to 'Alc/alcReverb.c')
-rw-r--r-- | Alc/alcReverb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Alc/alcReverb.c b/Alc/alcReverb.c index 161eb28a..1f569d27 100644 --- a/Alc/alcReverb.c +++ b/Alc/alcReverb.c @@ -445,7 +445,7 @@ ALvoid VerbUpdate(ALCcontext *Context, ALeffectslot *Slot, ALeffect *Effect) // what is done here. // If the HF limit parameter is flagged, calculate an appropriate limit // based on the air absorption parameter. - if(Effect->Reverb.DecayHFLimit) + if(Effect->Reverb.DecayHFLimit && Effect->Reverb.AirAbsorptionGainHF < 1.0f) { ALfloat limitRatio; @@ -457,8 +457,8 @@ ALvoid VerbUpdate(ALCcontext *Context, ALeffectslot *Slot, ALeffect *Effect) // The delay length is cancelled out of the equation, so it can be // calculated once for all lines. limitRatio = 1.0f / (log10(Effect->Reverb.AirAbsorptionGainHF) * - SPEEDOFSOUNDMETRESPERSEC*Effect->Reverb.DecayTime/ - -60.0f * 20.0f); + SPEEDOFSOUNDMETRESPERSEC * + Effect->Reverb.DecayTime / -60.0f * 20.0f); // Need to limit the result to a minimum of 0.1, just like the HF // ratio parameter. limitRatio = __max(limitRatio, 0.1f); |