Simple C++ program to speak the muted state of your default input device using a global hotkey.
The current way of determining if an input device is muted or not on Windows is incredibly annoying:
- Open mmsys.cpl.
- Find the recording tab.
- Find your device.
- Press Alt+P.
- Control tab until you find the listen tab.
- Check listen to this device.
- Press Alt+A.
- Listen, and determine if it is or not, finally.
- Uncheck the box, hit apply, and close all the dialogs you just opened.
I have a laptop with a dedicated mute key that's super easy to hit, and I've hit it by accident many times, initially leading to my great confusion when no one could hear me, and later my paranoia that I hit it every time I launched a program that used the microphone. Hence, this program was born. Once you run it, it will passively sit in the background, waiting for you to press Control+Alt+Shift+M. When you do, the current state of your default input device will be spoken.
The way this program works is by taking a tiny sample of audio (50 MS or so) from your default input device, getting the noise level (in DB), and comparing it to a configurable value. If the value is less than or equal to the configured value, the microphone is considered muted. By default, the value is -60 DB, but you can always change it. Open the config.ini file alongside the program and change the value of MinLevel in the Settings section to your desired value. You'll have to relaunch the program for this change to take effect.