summaryrefslogtreecommitdiff
path: root/indra/newview/llvieweraudio.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-12-13 16:14:05 -0600
committerDave Parks <davep@lindenlab.com>2022-12-13 16:14:05 -0600
commit9e7829c9cb140f994c9aa12dddcd4518c4c43a40 (patch)
tree01a24506c244b875bdeb402498bf3cb11658debb /indra/newview/llvieweraudio.cpp
parent5fcfe95422b4c3a5434b3eb711cd12401d4329d3 (diff)
parenta4397723b7ed1e5a8c86b104fd5a8b94da03abb9 (diff)
Merge branch 'DRTVWR-559' of github.com:secondlife/viewer into DRTVWR-559
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);