As I mentioned in the comment, handling voice is very difficult.
You need to specify what you want to accomplish.For your information, I'll give you a rough idea.
Some laptops and multimedia keyboards have mute keys.Therefore, Windows pre-embedded the action to be taken when the mute key is pressed (even if the keyboard is not connected).
This method will only cause unmute and unmute to toggle.This method is not available when it comes to understanding the current mute state and taking action according to the state.Also, since it's just a key operation, a pop-up will appear on the screen to indicate the state of the voice.
Emulating the mute key from the program will result in unmute and unmute.Specifically, you can pass the SendInput
function with VK_VOLUME_MUTE
.
INPUT input={INPUT_KEYBOARD, {VK_VOLUME_MUTE}};
SendInput(1, & input, size of input);
© 2024 OneMinuteCode. All rights reserved.