diff options
author | Chris Robinson <[email protected]> | 2017-09-21 10:20:59 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-09-21 10:20:59 -0700 |
commit | fc9cb2fbd8b96fd4bddf3123b5c5479bec089d7f (patch) | |
tree | 9891d7339ffb5246680a989aa1b0bcf8cfbabf79 /Alc/ALu.c | |
parent | 90cedbea49e9756d97033962f6c1145991bc7095 (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.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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) { |