mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 03:37:59 +01:00
[VCM]Do not trigger cascade of un/mute changes (#29131)
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -73,7 +73,6 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
void setMuteChangedCallback();
|
||||
void init_settings();
|
||||
void updateControlledMicrophones(const std::wstring_view new_mic);
|
||||
MicrophoneDevice* controlledDefaultMic();
|
||||
|
||||
Reference in New Issue
Block a user