Skip to content

Commit 5047a0b

Browse files
authored
Merge pull request #4100 from secondlife/viewer-1865-for-2025.04
Viewer 1865 for 2025.04
2 parents a31b7ae + 28edf9e commit 5047a0b

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

indra/newview/llvoicewebrtc.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,10 @@ void LLWebRTCVoiceClient::updatePosition(void)
985985
LLWebRTCVoiceClient::participantStatePtr_t participant = findParticipantByID("Estate", gAgentID);
986986
if(participant)
987987
{
988-
participant->mRegion = gAgent.getRegion()->getRegionID();
988+
if (participant->mRegion != region->getRegionID()) {
989+
participant->mRegion = region->getRegionID();
990+
setMuteMic(mMuteMic);
991+
}
989992
}
990993
}
991994
}
@@ -3104,23 +3107,20 @@ LLVoiceWebRTCSpatialConnection::~LLVoiceWebRTCSpatialConnection()
31043107

31053108
void LLVoiceWebRTCSpatialConnection::setMuteMic(bool muted)
31063109
{
3107-
if (mMuted != muted)
3110+
mMuted = muted;
3111+
if (mWebRTCAudioInterface)
31083112
{
3109-
mMuted = muted;
3110-
if (mWebRTCAudioInterface)
3113+
LLViewerRegion *regionp = gAgent.getRegion();
3114+
if (regionp && mRegionID == regionp->getRegionID())
31113115
{
3112-
LLViewerRegion *regionp = gAgent.getRegion();
3113-
if (regionp && mRegionID == regionp->getRegionID())
3114-
{
3115-
mWebRTCAudioInterface->setMute(muted);
3116-
}
3117-
else
3118-
{
3119-
// Always mute this agent with respect to neighboring regions.
3120-
// Peers don't want to hear this agent from multiple regions
3121-
// as that'll echo.
3122-
mWebRTCAudioInterface->setMute(true);
3123-
}
3116+
mWebRTCAudioInterface->setMute(muted);
3117+
}
3118+
else
3119+
{
3120+
// Always mute this agent with respect to neighboring regions.
3121+
// Peers don't want to hear this agent from multiple regions
3122+
// as that'll echo.
3123+
mWebRTCAudioInterface->setMute(true);
31243124
}
31253125
}
31263126
}

0 commit comments

Comments
 (0)