diff options
| author | Brad Linden <brad@lindenlab.com> | 2022-12-12 17:59:34 -0800 |
|---|---|---|
| committer | Brad Linden <brad@lindenlab.com> | 2022-12-12 17:59:34 -0800 |
| commit | eb526fec0aadcaf30363fdfb1e253a609bf83acc (patch) | |
| tree | 6071628f41ca793007b645aa30d255044ddbfe43 /indra/newview/llvieweraudio.cpp | |
| parent | c9c611fd12f55ac6d6717ba17139ba61a6db581f (diff) | |
| parent | a0c3d69c620a92d73a1008f218680fb4d0ef9255 (diff) | |
Merge remote-tracking branch 'origin/main' into DRTVWR-559
Diffstat (limited to 'indra/newview/llvieweraudio.cpp')
| -rw-r--r-- | indra/newview/llvieweraudio.cpp | 15 |
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); |
