From 9fe6e65aed913322e960122271bd7c238154496f Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 18 Oct 2025 12:26:47 +0200 Subject: [PATCH 1/2] Continue keeping built-in audio effects disabled - only disable duplicate call to updateDevices() which is already called via LLWebRTCVoiceClient::initWebRTC() -> LLWebRTCVoiceClient::refreshDeviceLists() -> LLWebRTCImpl::refreshDevices() and duplicate to LLWebRTCVoiceClient::initWebRTC() -> llwebrtc::init() -> LLWebRTCImpl::init() --- indra/llwebrtc/llwebrtc.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp index 68aa4f4971..cacdf7d876 100644 --- a/indra/llwebrtc/llwebrtc.cpp +++ b/indra/llwebrtc/llwebrtc.cpp @@ -339,22 +339,20 @@ void LLWebRTCImpl::init() nullptr /* video_decoder_factory */, nullptr /* audio_mixer */, mAudioProcessingModule); - // [FIRE-36022] - Removing my USB headset crashes entire viewer - // It seems that this code is also called by one of the other callback functions - // and ends up creating a 2nd observer,which when there was a hardware change, - // would cause multiple messages to be dumped to the queue at the same time and - // cause a possible race condition/spin lock issue. - /* mWorkerThread->PostTask( + mWorkerThread->PostTask( [this]() { if (mDeviceModule) { mDeviceModule->EnableBuiltInAEC(false); - updateDevices(); + // [FIRE-36022] - Removing my USB headset crashes entire viewer + // It seems that this code is also called by one of the other callback functions + // and ends up creating a 2nd observer,which when there was a hardware change, + // would cause multiple messages to be dumped to the queue at the same time and + // cause a possible race condition/spin lock issue. + //updateDevices(); } }); - */ - // [FIRE-36022] } void LLWebRTCImpl::terminate() From d733bef269c27a61dd520229da303d73bbadcdc0 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 18 Oct 2025 12:42:20 +0200 Subject: [PATCH 2/2] Restore original indentation --- indra/llwebrtc/llwebrtc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp index cacdf7d876..b4f2b722c9 100644 --- a/indra/llwebrtc/llwebrtc.cpp +++ b/indra/llwebrtc/llwebrtc.cpp @@ -339,7 +339,7 @@ void LLWebRTCImpl::init() nullptr /* video_decoder_factory */, nullptr /* audio_mixer */, mAudioProcessingModule); - mWorkerThread->PostTask( + mWorkerThread->PostTask( [this]() { if (mDeviceModule)