aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-09-21 10:20:59 -0700
committerChris Robinson <[email protected]>2017-09-21 10:20:59 -0700
commitfc9cb2fbd8b96fd4bddf3123b5c5479bec089d7f (patch)
tree9891d7339ffb5246680a989aa1b0bcf8cfbabf79 /Alc/ALu.c
parent90cedbea49e9756d97033962f6c1145991bc7095 (diff)
Use the app-specified speed of sound for reverb decay
Specifically, the initial reverb decay as determined by the source distance, and the reverb decayhf limit from air absorption.
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index dc14815d..dcd00c5b 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -1105,7 +1105,8 @@ static void CalcAttnSourceParams(ALvoice *voice, const struct ALvoiceProps *prop
else if(SendSlots[i]->Params.AuxSendAuto)
{
RoomRolloff[i] = SendSlots[i]->Params.RoomRolloff + props->RoomRolloffFactor;
- DecayDistance[i] = SendSlots[i]->Params.DecayTime * SPEEDOFSOUNDMETRESPERSEC;
+ DecayDistance[i] = SendSlots[i]->Params.DecayTime * Listener->Params.SpeedOfSound *
+ Listener->Params.MetersPerUnit;
DecayHFDistance[i] = DecayDistance[i] * SendSlots[i]->Params.DecayHFRatio;
if(SendSlots[i]->Params.DecayHFLimit)
{