summaryrefslogtreecommitdiff
path: root/indra/newview/llvoicewebrtc.cpp
diff options
context:
space:
mode:
authorsethalvesLL <setha@lindenlab.com>2025-05-22 09:44:11 -0700
committerGitHub <noreply@github.com>2025-05-22 09:44:11 -0700
commit38a643ae31db9f42ea07a3b221aff43213b7381f (patch)
tree16a1617c8d08756999aa8bace1f8740bc0e3b984 /indra/newview/llvoicewebrtc.cpp
parent0129106bdf80aa7bfb897e39a32045daf2cc471c (diff)
parent4cff6997a1817eba8629def2bd9fddbfe4bf5626 (diff)
Merge pull request #4052 from secondlife/seth/viewer-1865
adjust which webrtc tracks are enabled when the avatar crosses a region border
Diffstat (limited to 'indra/newview/llvoicewebrtc.cpp')
-rw-r--r--indra/newview/llvoicewebrtc.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp
index 08fcec86ac..9835a69e4e 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 != region->getRegionID()) {
+ participant->mRegion = region->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);
}
}
}