summaryrefslogtreecommitdiff
path: root/indra/llwebrtc
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llwebrtc')
-rw-r--r--indra/llwebrtc/llwebrtc.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp
index ce5f487b32..4b98944d10 100644
--- a/indra/llwebrtc/llwebrtc.cpp
+++ b/indra/llwebrtc/llwebrtc.cpp
@@ -720,7 +720,11 @@ 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 CM_WEBRTC
if (!mDeviceModule || !mVoiceEnabled || mTuningMode || mDeviceModule->Playing() || mPeerConnections.empty())
+#else
+ if (!mDeviceModule || !mVoiceEnabled || mTuningMode || mPeerConnections.empty())
+#endif
{
return;
}
@@ -744,6 +748,18 @@ void LLWebRTCImpl::workerStartPlayout()
}
}
+#if !CM_WEBRTC
+ if (mDeviceModule->Playing())
+ {
+ if (mDeviceModule->GetPlayoutDevice() == playoutDevice)
+ {
+ return;
+ }
+
+ mDeviceModule->StopPlayout();
+ }
+#endif
+
#if WEBRTC_WIN
if (playoutDevice < 0)
{