diff options
author | Chris Robinson <[email protected]> | 2021-05-25 14:08:16 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2021-05-25 14:08:16 -0700 |
commit | 58a9549a5886fe91aba698abb4e6e4c0c94f129e (patch) | |
tree | 9b6dc836e64496f6dffbc8070874ef5ce4f21a09 /alc/context.cpp | |
parent | 62e6ce6d7322bc83ba3150316d9c921f5fadbb99 (diff) |
Handle the listener position separate from the rotation matrix
It's too unstable with larger vectors. Even when the source and listener
positions are the same, floating point precision can cause noticeable rounding
errors.
Diffstat (limited to 'alc/context.cpp')
-rw-r--r-- | alc/context.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/alc/context.cpp b/alc/context.cpp index 9f0b6272..a97c2a68 100644 --- a/alc/context.cpp +++ b/alc/context.cpp @@ -289,6 +289,7 @@ void ALCcontext::init() mExtensionList = alExtList; + mParams.Position = alu::Vector{0.0f, 0.0f, 0.0f, 1.0f}; mParams.Matrix = alu::Matrix::Identity(); mParams.Velocity = alu::Vector{}; mParams.Gain = mListener.Gain; |