[VCM]Do not trigger cascade of un/mute changes (#29131)

This commit is contained in:
Andrey Nekrasov 2023-10-17 18:35:49 +02:00 committed by GitHub
parent d25edc33a2
commit 413624397e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 22 deletions

View File

@ -342,7 +342,6 @@ void VideoConferenceModule::onMicrophoneConfigurationChanged()
toolbar.setMicrophoneMute(muted); toolbar.setMicrophoneMute(muted);
}); });
} }
setMuteChangedCallback();
} }
VideoConferenceModule::VideoConferenceModule() 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() void VideoConferenceModule::init_settings()
{ {
try try
@ -552,7 +532,6 @@ void VideoConferenceModule::updateControlledMicrophones(const std::wstring_view
controlledMic->set_muted(true); controlledMic->set_muted(true);
} }
} }
setMuteChangedCallback();
} }
MicrophoneDevice* VideoConferenceModule::controlledDefaultMic() MicrophoneDevice* VideoConferenceModule::controlledDefaultMic()

View File

@ -73,7 +73,6 @@ public:
private: private:
void setMuteChangedCallback();
void init_settings(); void init_settings();
void updateControlledMicrophones(const std::wstring_view new_mic); void updateControlledMicrophones(const std::wstring_view new_mic);
MicrophoneDevice* controlledDefaultMic(); MicrophoneDevice* controlledDefaultMic();