@@ -735,8 +735,6 @@ void LLWebRTCVoiceClient::OnDevicesChangedImpl(const llwebrtc::LLWebRTCVoiceDevi
735735 std::string outputDevice = gSavedSettings .getString (" VoiceOutputAudioDevice" );
736736
737737 LL_DEBUGS (" Voice" ) << " Setting devices to-input: '" << inputDevice << " ' output: '" << outputDevice << " '" << LL_ENDL;
738- bool update_render = false ;
739- bool update_capture = false ;
740738
741739 // only set the render device if the device list has changed.
742740 if (mRenderDevices .size () != render_devices.size () || !std::equal (mRenderDevices .begin (),
@@ -750,7 +748,7 @@ void LLWebRTCVoiceClient::OnDevicesChangedImpl(const llwebrtc::LLWebRTCVoiceDevi
750748 {
751749 addRenderDevice (LLVoiceDevice (device.mDisplayName , device.mID ));
752750 }
753- update_render = true ;
751+ setRenderDevice (outputDevice) ;
754752 }
755753
756754 // only set the capture device if the device list has changed.
@@ -767,22 +765,6 @@ void LLWebRTCVoiceClient::OnDevicesChangedImpl(const llwebrtc::LLWebRTCVoiceDevi
767765
768766 addCaptureDevice (LLVoiceDevice (device.mDisplayName , device.mID ));
769767 }
770- update_capture = true ;
771- }
772-
773- if (update_render && update_capture)
774- {
775- // Do both in one go to avoid multiple deployDevices calls.
776- // And to avoid situation where workerDeployDevices has an
777- // obsolete device id
778- setDevices (inputDevice, outputDevice);
779- }
780- else if (update_render)
781- {
782- setRenderDevice (outputDevice);
783- }
784- else if (update_capture)
785- {
786768 setCaptureDevice (inputDevice);
787769 }
788770
@@ -816,15 +798,6 @@ void LLWebRTCVoiceClient::setRenderDevice(const std::string& name)
816798 }
817799}
818800
819- void LLWebRTCVoiceClient::setDevices (const std::string& capture_name, const std::string& render_name)
820- {
821- if (mWebRTCDeviceInterface )
822- {
823- LL_DEBUGS (" Voice" ) << " new capture device: " << capture_name << " New render device: " << render_name << LL_ENDL;
824- mWebRTCDeviceInterface ->setDevices (capture_name, render_name);
825- }
826- }
827-
828801void LLWebRTCVoiceClient::tuningStart ()
829802{
830803 if (!mIsInTuningMode )
0 commit comments