diff options
author | Chris Robinson <[email protected]> | 2023-12-06 20:27:01 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-12-06 20:27:01 -0800 |
commit | 98e7cf3b169a7f8b4bd6210242247b67645856ab (patch) | |
tree | fdde6b80cfbcec30dbd547ab0fb3ba09589c4fbd /alc/alu.cpp | |
parent | a7fdf196ac182680ef4a613571d8f0a7844cfc15 (diff) |
Don't apply the reverb room rolloff with a 0 ref distance
Diffstat (limited to 'alc/alu.cpp')
-rw-r--r-- | alc/alu.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/alc/alu.cpp b/alc/alu.cpp index 2bc648bf..a3083b7f 100644 --- a/alc/alu.cpp +++ b/alc/alu.cpp @@ -1621,8 +1621,9 @@ void CalcAttnSourceParams(Voice *voice, const VoiceProps *props, const ContextBa /* The reverb effect's room rolloff factor always applies to an * inverse distance rolloff model. */ - WetGain[i].Base *= calc_attenuation(Distance, props->RefDistance, - SendSlots[i]->RoomRolloff); + if(props->RefDistance > 0.0f) + WetGain[i].Base *= calc_attenuation(Distance, props->RefDistance, + SendSlots[i]->RoomRolloff); if(distance_meters > std::numeric_limits<float>::epsilon()) WetGain[i].HF *= std::pow(SendSlots[i]->AirAbsorptionGainHF, distance_meters); |