I'm trying to detect if there is a device hooked into the audio jack with python. This is in Windows 7.
see https://superuser.com/questions/110933/how-does-a-sound-card-determine-if-headphones-are-plugged-in
The answer is: It depends on your hardware. I have not seen any operating system detect headphones in the past decade, but some cheap soundcards do support it. (edit: According to Larry Osterman's comment, they are now standard.)
If your soundcard supports it, I believe you will find the following to be the answer you are looking for: Detecting when head phones are plugged in (python will probably need to ask some system API)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With