diff options
author | Chris Robinson <[email protected]> | 2021-01-28 08:36:49 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2021-01-28 08:36:49 -0800 |
commit | 3702ee669b893ceb6ef7571c9f2134129af95dbe (patch) | |
tree | c4040278618d33b565bcd1d96146e8765ceb5ba5 /alc/alu.cpp | |
parent | 27e8807a5b9ff1ced122834d70ea6612060d2cf1 (diff) |
Add a panning "deadzone" for spatialized sources
It is now the greater of 'epsilon' (1 / 2**23) or ref_distance/1024.
Diffstat (limited to 'alc/alu.cpp')
-rw-r--r-- | alc/alu.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/alc/alu.cpp b/alc/alu.cpp index 0cbfefec..a29c2833 100644 --- a/alc/alu.cpp +++ b/alc/alu.cpp @@ -1323,7 +1323,7 @@ void CalcAttnSourceParams(Voice *voice, const VoiceProps *props, const ALCcontex const bool directional{Direction.normalize() > 0.0f}; alu::Vector ToSource{Position[0], Position[1], Position[2], 0.0f}; - const float Distance{ToSource.normalize()}; + const float Distance{ToSource.normalize(props->RefDistance / 1024.0f)}; /* Initial source gain */ GainTriplet DryGain{props->Gain, 1.0f, 1.0f}; |