summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2026-09-02 14:19:15 +0300
committerGitHub <noreply@github.com>2026-09-02 14:19:15 +0300
commit89f652a6d16e469da674397a8cee9d1071968610 (patch)
tree47b876b0a942f2690f1472c3b411bfd13d74cd22
parent9818c3e0077dcf262b121370ef191b56c224d51a (diff)
#6228 fix setting the default device after a region change
Patch contributed by TJ Hecklezz
-rw-r--r--indra/llwebrtc/llwebrtc.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp
index 5b322d1b5d..b6b205e858 100644
--- a/indra/llwebrtc/llwebrtc.cpp
+++ b/indra/llwebrtc/llwebrtc.cpp
@@ -702,7 +702,7 @@ void LLWebRTCImpl::workerStartPlayout()
{
// Only run playout while voice is enabled and there's a connection to
// render (running the output device otherwise is heard as a buzz).
- if (!mDeviceModule || !mVoiceEnabled || mTuningMode || mDeviceModule->Playing() || mPeerConnections.empty())
+ if (!mDeviceModule || !mVoiceEnabled || mTuningMode || mPeerConnections.empty())
{
return;
}
@@ -726,6 +726,16 @@ void LLWebRTCImpl::workerStartPlayout()
}
}
+ if (mDeviceModule->Playing())
+ {
+ if (mDeviceModule->GetPlayoutDevice() == playoutDevice)
+ {
+ return;
+ }
+
+ mDeviceModule->StopPlayout();
+ }
+
#if WEBRTC_WIN
if (playoutDevice < 0)
{