aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALu.c10
-rw-r--r--Alc/effects/reverb.c4
2 files changed, 7 insertions, 7 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index c27617f5..22aca28a 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -1098,8 +1098,8 @@ static void CalcAttnSourceParams(ALvoice *voice, const struct ALvoiceProps *prop
RoomAirAbsorption[i] = SendSlots[i]->Params.AirAbsorptionGainHF;
if(SendSlots[i]->Params.DecayHFLimit && RoomAirAbsorption[i] < 1.0f)
{
- ALfloat limitRatio = log10f(0.001f)/*-60 dB*/ / (log10f(RoomAirAbsorption[i]) *
- DecayDistance[i]);
+ ALfloat limitRatio = log10f(REVERB_DECAY_GAIN) /
+ (log10f(RoomAirAbsorption[i]) * DecayDistance[i]);
limitRatio = minf(limitRatio, SendSlots[i]->Params.DecayHFRatio);
DecayHFDistance[i] = minf(DecayHFDistance[i], limitRatio*DecayDistance[i]);
}
@@ -1258,15 +1258,15 @@ static void CalcAttnSourceParams(ALvoice *voice, const struct ALvoiceProps *prop
if(!(DecayDistance[i] > 0.0f))
continue;
- gain = powf(0.001f/*-60dB*/, meters_base/DecayDistance[i]);
+ gain = powf(REVERB_DECAY_GAIN, meters_base/DecayDistance[i]);
WetGain[i] *= gain;
/* Yes, the wet path's air absorption is applied with
* WetGainAuto on, rather than WetGainHFAuto.
*/
if(gain > 0.0f)
{
- ALfloat gainhf = powf(0.001f/*-60dB*/, meters_base/DecayHFDistance[i]) / gain;
- WetGainHF[i] *= minf(gainhf, 1.0f);
+ ALfloat gainhf = powf(REVERB_DECAY_GAIN, meters_base/DecayHFDistance[i]);
+ WetGainHF[i] *= minf(gainhf / gain, 1.0f);
}
}
}
diff --git a/Alc/effects/reverb.c b/Alc/effects/reverb.c
index 0d0ca277..39daff53 100644
--- a/Alc/effects/reverb.c
+++ b/Alc/effects/reverb.c
@@ -645,7 +645,7 @@ static ALboolean ALreverbState_deviceUpdate(ALreverbState *State, ALCdevice *Dev
*/
static inline ALfloat CalcDecayCoeff(const ALfloat length, const ALfloat decayTime)
{
- return powf(0.001f/*-60 dB*/, length/decayTime);
+ return powf(REVERB_DECAY_GAIN, length/decayTime);
}
/* Calculate a decay length from a coefficient and the time until the decay
@@ -653,7 +653,7 @@ static inline ALfloat CalcDecayCoeff(const ALfloat length, const ALfloat decayTi
*/
static inline ALfloat CalcDecayLength(const ALfloat coeff, const ALfloat decayTime)
{
- return log10f(coeff) * decayTime / log10f(0.001f)/*-60 dB*/;
+ return log10f(coeff) * decayTime / log10f(REVERB_DECAY_GAIN);
}
/* Calculate an attenuation to be applied to the input of any echo models to