Avoid a log10 constant call

This commit is contained in:
Chris Robinson
2020-05-21 09:46:39 -07:00
parent 5bbbe8341e
commit e98017b475
+2 -2
View File
@@ -1300,8 +1300,8 @@ void CalcAttnSourceParams(Voice *voice, const VoiceProps *props, const ALCcontex
* decay distance (so it doesn't take any longer to decay
* than the air would allow).
*/
const float absorb_dist{std::log10(REVERB_DECAY_GAIN) /
std::log10(airAbsorption)};
constexpr float log10_decaygain{-3.0f/*std::log10(REVERB_DECAY_GAIN)*/};
const float absorb_dist{log10_decaygain / std::log10(airAbsorption)};
DecayDistance[i].HF = minf(absorb_dist, DecayDistance[i].HF);
}
}