summaryrefslogtreecommitdiff
path: root/indra/newview/llvieweraudio.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2023-02-15 15:11:35 -0500
committerNat Goodspeed <nat@lindenlab.com>2023-02-15 15:11:35 -0500
commitaec39a0f9f7f16a7970e96bad552ca684af57e3f (patch)
tree742bfd7fee6d2cf98a9a93b5fc3d17ff2ca6557c /indra/newview/llvieweraudio.cpp
parent6ef3df54b3ff0dcfed3000819209a7633e53a32b (diff)
parent23a3da37a91ea80311b5820c48a12d56b989f69d (diff)
SL-18330: Merge branch 'contribute' into sl-18330-merge
Diffstat (limited to 'indra/newview/llvieweraudio.cpp')
-rw-r--r--indra/newview/llvieweraudio.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp
index f810e5f4ef..cc73f7ca80 100644
--- a/indra/newview/llvieweraudio.cpp
+++ b/indra/newview/llvieweraudio.cpp
@@ -496,7 +496,20 @@ void audio_update_listener()
if (gAudiop)
{
// update listener position because agent has moved
- LLVector3d lpos_global = gAgentCamera.getCameraPositionGlobal();
+ static LLUICachedControl<S32> mEarLocation("MediaSoundsEarLocation", 0);
+ LLVector3d ear_position;
+ switch(mEarLocation)
+ {
+ case 0:
+ default:
+ ear_position = gAgentCamera.getCameraPositionGlobal();
+ break;
+
+ case 1:
+ ear_position = gAgent.getPositionGlobal();
+ break;
+ }
+ LLVector3d lpos_global = ear_position;
LLVector3 lpos_global_f;
lpos_global_f.setVec(lpos_global);