From 413624397e176f9ae512c861cce44b5db564244f Mon Sep 17 00:00:00 2001 From: Andrey Nekrasov Date: Tue, 17 Oct 2023 18:35:49 +0200 Subject: [PATCH] [VCM]Do not trigger cascade of un/mute changes (#29131) --- .../VideoConferenceModule.cpp | 21 ------------------- .../VideoConferenceModule.h | 1 - 2 files changed, 22 deletions(-) diff --git a/src/modules/videoconference/VideoConferenceModule/VideoConferenceModule.cpp b/src/modules/videoconference/VideoConferenceModule/VideoConferenceModule.cpp index 5f2825c940..fa692895f4 100644 --- a/src/modules/videoconference/VideoConferenceModule/VideoConferenceModule.cpp +++ b/src/modules/videoconference/VideoConferenceModule/VideoConferenceModule.cpp @@ -342,7 +342,6 @@ void VideoConferenceModule::onMicrophoneConfigurationChanged() toolbar.setMicrophoneMute(muted); }); } - setMuteChangedCallback(); } VideoConferenceModule::VideoConferenceModule() @@ -406,25 +405,6 @@ void VideoConferenceModule::set_config(const wchar_t* config) } } -void VideoConferenceModule::setMuteChangedCallback() -{ - // Keep all controlledMic mute state same _microphoneTrackedInUI - // Should not change manually in Control Panel - for (const auto& controlledMic : _controlledMicrophones) - { - if (controlledMic->id() != _microphoneTrackedInUI->id()) - { - controlledMic->set_mute_changed_callback([&](const bool muted) { - auto muteState = getMicrophoneMuteState(); - if (muted != muteState) - { - controlledMic->set_muted(muteState); - } - }); - } - } -} - void VideoConferenceModule::init_settings() { try @@ -552,7 +532,6 @@ void VideoConferenceModule::updateControlledMicrophones(const std::wstring_view controlledMic->set_muted(true); } } - setMuteChangedCallback(); } MicrophoneDevice* VideoConferenceModule::controlledDefaultMic() diff --git a/src/modules/videoconference/VideoConferenceModule/VideoConferenceModule.h b/src/modules/videoconference/VideoConferenceModule/VideoConferenceModule.h index 6e327df25b..f3b835867a 100644 --- a/src/modules/videoconference/VideoConferenceModule/VideoConferenceModule.h +++ b/src/modules/videoconference/VideoConferenceModule/VideoConferenceModule.h @@ -73,7 +73,6 @@ public: private: - void setMuteChangedCallback(); void init_settings(); void updateControlledMicrophones(const std::wstring_view new_mic); MicrophoneDevice* controlledDefaultMic();