diff options
| author | Seth Alves <seth.alves@gmail.com> | 2025-05-09 09:14:46 -0700 | 
|---|---|---|
| committer | Seth Alves <seth.alves@gmail.com> | 2025-05-19 10:01:09 -0700 | 
| commit | b2b021feadafbff8735d3ab46343efdebab59dca (patch) | |
| tree | 187a8877a315ff1e4f9c4b4dd4d60e0ce192812f /indra | |
| parent | d5313e7161bb99045adc4a1a34d7f85de609d97b (diff) | |
adjust which webrtc tracks are enabled when the avatar crosses a region border
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llvoicewebrtc.cpp | 32 | 
1 files changed, 16 insertions, 16 deletions
| diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index 08fcec86ac..cda02b7e8a 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -985,7 +985,10 @@ void LLWebRTCVoiceClient::updatePosition(void)          LLWebRTCVoiceClient::participantStatePtr_t participant = findParticipantByID("Estate", gAgentID);          if(participant)          { -            participant->mRegion = gAgent.getRegion()->getRegionID(); +            if (participant->mRegion != gAgent.getRegion()->getRegionID()) { +                participant->mRegion = gAgent.getRegion()->getRegionID(); +                setMuteMic(mMuteMic); +            }          }      }  } @@ -3104,23 +3107,20 @@ LLVoiceWebRTCSpatialConnection::~LLVoiceWebRTCSpatialConnection()  void LLVoiceWebRTCSpatialConnection::setMuteMic(bool muted)  { -    if (mMuted != muted) +    mMuted = muted; +    if (mWebRTCAudioInterface)      { -        mMuted = muted; -        if (mWebRTCAudioInterface) +        LLViewerRegion *regionp = gAgent.getRegion(); +        if (regionp && mRegionID == regionp->getRegionID())          { -            LLViewerRegion *regionp = gAgent.getRegion(); -            if (regionp && mRegionID == regionp->getRegionID()) -            { -                mWebRTCAudioInterface->setMute(muted); -            } -            else -            { -                // Always mute this agent with respect to neighboring regions. -                // Peers don't want to hear this agent from multiple regions -                // as that'll echo. -                mWebRTCAudioInterface->setMute(true); -            } +            mWebRTCAudioInterface->setMute(muted); +        } +        else +        { +            // Always mute this agent with respect to neighboring regions. +            // Peers don't want to hear this agent from multiple regions +            // as that'll echo. +            mWebRTCAudioInterface->setMute(true);          }      }  } | 
