diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2025-05-08 22:00:16 +0300 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-05-10 10:11:53 +0300 |
commit | edb0032c95de23170521f33fea273a2844665b0a (patch) | |
tree | 713b0a142746a33c88f2e0092f4abfc10ff085e2 /indra/llwebrtc/llwebrtc.cpp | |
parent | 9668d2f0eff761f1de71cea718a46e807f9c00a8 (diff) |
#3542 Microphone doesn't switch after plugging in an audio device
Diffstat (limited to 'indra/llwebrtc/llwebrtc.cpp')
-rw-r--r-- | indra/llwebrtc/llwebrtc.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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_refptr<webrtc::AudioDeviceM // has it at 0 device_module->SetRecordingDevice(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_refptr<webrtc::AudioDeviceMo #else device_module->SetPlayoutDevice(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(); } }); |