summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)
{