From edb0032c95de23170521f33fea273a2844665b0a Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 8 May 2025 22:00:16 +0300 Subject: #3542 Microphone doesn't switch after plugging in an audio device --- indra/llwebrtc/llwebrtc.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/llwebrtc/llwebrtc.cpp') diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp index 0daa767766..a306600f85 100644 --- a/indra/llwebrtc/llwebrtc.cpp +++ b/indra/llwebrtc/llwebrtc.cpp @@ -430,9 +430,7 @@ void ll_set_device_module_capture_device(rtc::scoped_refptrSetRecordingDevice(device + 1); #endif - device_module->SetStereoRecording(false); device_module->InitMicrophone(); - device_module->InitRecording(); } void LLWebRTCImpl::setCaptureDevice(const std::string &id) @@ -473,6 +471,8 @@ void LLWebRTCImpl::setCaptureDevice(const std::string &id) ll_set_device_module_capture_device(mPeerDeviceModule, recordingDevice); if (recording) { + mPeerDeviceModule->SetStereoRecording(false); + mPeerDeviceModule->InitRecording(); mPeerDeviceModule->StartRecording(); } }); @@ -494,9 +494,7 @@ void ll_set_device_module_render_device(rtc::scoped_refptrSetPlayoutDevice(device + 1); #endif - device_module->SetStereoPlayout(true); device_module->InitSpeaker(); - device_module->InitPlayout(); } void LLWebRTCImpl::setRenderDevice(const std::string &id) @@ -540,6 +538,8 @@ void LLWebRTCImpl::setRenderDevice(const std::string &id) ll_set_device_module_render_device(mPeerDeviceModule, playoutDevice); if (playing) { + mPeerDeviceModule->SetStereoPlayout(true); + mPeerDeviceModule->InitPlayout(); mPeerDeviceModule->StartPlayout(); } }); -- cgit v1.2.3