mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-13 19:19:23 +08:00
[VCM]Do not trigger cascade of un/mute changes (#29131)
This commit is contained in:
parent
d25edc33a2
commit
413624397e
@ -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()
|
||||||
|
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user