I'm trying to detect if there is a device hooked into the audio jack with python. This is in Windows 7.
Asked
Active
Viewed 2,080 times
1 Answers
2
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)

Community
- 1
- 1

ninjagecko
- 88,546
- 24
- 137
- 145
-
2Windows Vista and above have done this. And every audio solution sold with a Windows Vista or above logo is required to support jack detection. So I'm not totally sure I understand why you say "I havae not seen any operating system detect headphones in the past decade". Jack detection has been a part of Windows for the past half decade. – Larry Osterman May 06 '11 at 14:15