summaryrefslogtreecommitdiff
path: root/indra/newview/llvoicewebrtc.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-10-26 12:14:53 +0200
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-10-26 13:33:57 +0200
commit0e3ba50520dd4cae89951e62c38b8647f76d9519 (patch)
tree968e4d01cd2bc5cb0bbf93fa1a376864b1ed2486 /indra/newview/llvoicewebrtc.cpp
parent34dcaaaacd7865e3a652159b4fb1d58dfa0cb91b (diff)
Revert "Improve switching of webrtc devices"
Wrong approach. Might need to split workerDeployDevices into separate recording and rendering variants. This partiall reverts commit bb26aa3c2cb8ff961668cf0ad8180d3e9c57f941, I left log lines.
Diffstat (limited to 'indra/newview/llvoicewebrtc.cpp')
-rw-r--r--indra/newview/llvoicewebrtc.cpp29
1 files changed, 1 insertions, 28 deletions
diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp
index 93f8f0d14a..32f2139679 100644
--- a/indra/newview/llvoicewebrtc.cpp
+++ b/indra/newview/llvoicewebrtc.cpp
@@ -735,8 +735,6 @@ void LLWebRTCVoiceClient::OnDevicesChangedImpl(const llwebrtc::LLWebRTCVoiceDevi
std::string outputDevice = gSavedSettings.getString("VoiceOutputAudioDevice");
LL_DEBUGS("Voice") << "Setting devices to-input: '" << inputDevice << "' output: '" << outputDevice << "'" << LL_ENDL;
- bool update_render = false;
- bool update_capture = false;
// only set the render device if the device list has changed.
if (mRenderDevices.size() != render_devices.size() || !std::equal(mRenderDevices.begin(),
@@ -750,7 +748,7 @@ void LLWebRTCVoiceClient::OnDevicesChangedImpl(const llwebrtc::LLWebRTCVoiceDevi
{
addRenderDevice(LLVoiceDevice(device.mDisplayName, device.mID));
}
- update_render = true;
+ setRenderDevice(outputDevice);
}
// only set the capture device if the device list has changed.
@@ -767,22 +765,6 @@ void LLWebRTCVoiceClient::OnDevicesChangedImpl(const llwebrtc::LLWebRTCVoiceDevi
addCaptureDevice(LLVoiceDevice(device.mDisplayName, device.mID));
}
- update_capture = true;
- }
-
- if (update_render && update_capture)
- {
- // Do both in one go to avoid multiple deployDevices calls.
- // And to avoid situation where workerDeployDevices has an
- // obsolete device id
- setDevices(inputDevice, outputDevice);
- }
- else if (update_render)
- {
- setRenderDevice(outputDevice);
- }
- else if (update_capture)
- {
setCaptureDevice(inputDevice);
}
@@ -816,15 +798,6 @@ void LLWebRTCVoiceClient::setRenderDevice(const std::string& name)
}
}
-void LLWebRTCVoiceClient::setDevices(const std::string& capture_name, const std::string& render_name)
-{
- if (mWebRTCDeviceInterface)
- {
- LL_DEBUGS("Voice") << "new capture device: " << capture_name << " New render device: " << render_name << LL_ENDL;
- mWebRTCDeviceInterface->setDevices(capture_name, render_name);
- }
-}
-
void LLWebRTCVoiceClient::tuningStart()
{
if (!mIsInTuningMode)