This commit is contained in:
Ken Cooke 2016-07-15 18:23:12 -07:00
parent 59ac2a789f
commit 1ee608ad2c

View file

@ -1309,7 +1309,7 @@ float AudioClient::gainForSource(float distance, float volume) {
// attenuate based on distance
if (distance >= ATTENUATION_BEGINS_AT_DISTANCE) {
gain /= distance; // attenuation = -6dB * log2(distance)
gain /= (distance/ATTENUATION_BEGINS_AT_DISTANCE); // attenuation = -6dB * log2(distance)
}
return gain;