| View previous topic :: View next topic |
| Author |
Message |
MAX Guest
|
Posted: Thu May 04, 2006 7:27 pm Post subject: Possible to detect if headphones are plugged in or not? |
|
|
I doubt it's possible, but I am wondering if there is a way to detect if headphones are currently plugged into the headphone jack...
It's probably very dependent on the system, but I figured it wouldn't hurt to ask. I work in an elementary school computer lab and sometimes the kids pull the headphones out of the plug and the audio plays really loudly, thus disturbing everything.
If there is a way to detect when this happens, I can have a script mute the sound until the headphones are plugged back in. |
|
| Back to top |
|
 |
Greg
Joined: 22 Dec 2005 Posts: 245
|
Posted: Thu May 04, 2006 7:33 pm Post subject: |
|
|
| Perhaps you can just lower the main volume and raise the headphone volume in the volume control window. |
|
| Back to top |
|
 |
evl
Joined: 24 Aug 2005 Posts: 1237
|
Posted: Thu May 04, 2006 10:04 pm Post subject: |
|
|
| Usually there's no seperate slider for headphone volume. I don't think it's possible to know if headphones have been plugged in. |
|
| Back to top |
|
 |
Guest
|
Posted: Thu May 04, 2006 11:10 pm Post subject: |
|
|
| Greg wrote: | | Perhaps you can just lower the main volume and raise the headphone volume in the volume control window. |
Even if you could raise the headphone volume manually, lowering the main volume would take precedence over that. |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Fri May 05, 2006 7:31 am Post subject: |
|
|
I thought about to detect a signal at this chanel using a frequency analyzer. The other (brainfart) option would be to connect a microphone and if the headphone is disconnected the mic should indicate that the sound level at this environment has changed.
Isn't there anything which displays that a headphone is currently dis-/connected ? |
|
| Back to top |
|
 |
Antonimo
Joined: 28 Apr 2006 Posts: 55
|
Posted: Fri May 05, 2006 8:57 am Post subject: |
|
|
I use a USB headphone (headset with mic) - It is listed in "Sounds and Audio Devices" as a separate device.
I have shortcut in the startup folder to C:\WINDOWS\SYSTEM32\SNDVOL32.EXE /D1 which opens the volume control for this device which has the title "Speaker" instead of the normal "Volume Control". The switch /D1 causes this separate device's volume control to open.
When the headset is not plugged in, running this shortcut brings up the default "Volume Control".
The point with this is that I can have quicker access to the volume controls for the headset when I am using it with, for example, Skype instead of having to go through the Control Panel to open the volume control.
I use Volume OSD - updated by Rajat (http://www.autohotkey.com/forum/viewtopic.php?t=88)
I would like there to be a similar autohotkey script to control the headset volume controls, but I have no idea how to create it.
Does anybody have any ideas? |
|
| Back to top |
|
 |
elchapin
Joined: 06 Mar 2007 Posts: 64 Location: Columbus, OH, USA
|
|
| Back to top |
|
 |
ggwwtt Guest
|
Posted: Thu Mar 20, 2008 3:24 pm Post subject: |
|
|
When I ran a computer classroom there were no external speakers on the machines. Every machine came with them, there were all in a big box somewhere.
FWIW |
|
| Back to top |
|
 |
Ursu Guest
|
Posted: Tue Jul 08, 2008 8:31 pm Post subject: |
|
|
I am also looking for a solution to having the volume muted when the earphones come out. I thought to use SoundSet to mute the speaker volume then unmute the headphones volume, but that muted everything:
SoundSet 1, speakers, mute
SoundSet 0, headphones, mute
I must be misunderstanding something about the relationship between the sound components.
In theory tho, windows realizes when you plug your headphones in and mutes the speakers, and unmutes them when you pull them out. We just want to be able to do the opposite...
Any ideas? |
|
| Back to top |
|
 |
Mustang
Joined: 17 May 2007 Posts: 421 Location: England
|
Posted: Tue Jul 08, 2008 10:12 pm Post subject: |
|
|
| Ursu wrote: | | In theory tho, windows realizes when you plug your headphones in and mutes the speakers, and unmutes them when you pull them out. We just want to be able to do the opposite... |
Actually I think this is a hardware based solution that soundcard manufacturers use and the OS doesn't have any say in it |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 8255 Location: Maywood, IL
|
Posted: Wed Jul 09, 2008 4:33 pm Post subject: |
|
|
yes, it is done in hardware. the connector has 5 pins, and when you plug in your headphones, the spring contacts disconnect from the two pins that go to the speakers and are touching the headphones, directing the sound voltage to the headphones. The OS knows nothing about it.
In the case of a USB headphone/microphone, you are technically unplugging the entire soundcard, which the OS does notice. _________________
(Common Answers) |
|
| Back to top |
|
 |
evan Guest
|
Posted: Wed Jul 09, 2008 6:42 pm Post subject: |
|
|
when i plug in my mp3 headphone into the headphone hole, this happens:
(using Vista, my XP computer doesnt show this message)
 |
|
| Back to top |
|
 |
Mat Guest
|
Posted: Tue Nov 25, 2008 11:44 am Post subject: |
|
|
| That's right, some soundcards detect when you plug something. Maybe this can be used to mute the whole computer when something is unplugged !? |
|
| Back to top |
|
 |
weiterbilder
Joined: 30 Oct 2008 Posts: 33
|
Posted: Thu Dec 04, 2008 12:41 am Post subject: Re: Possible to detect if headphones are plugged in or not? |
|
|
| MAX wrote: | | I doubt it's possible, but I am wondering if there is a way to detect if headphones are currently plugged into the headphone jack... | I don't know how they do it, but my mainboard soundcard driver "Realtek HD Audio Manager" displays exactly that under "Audio - E/A". I guess it is an impedance measurement, so if resistance falls below a special threshold, the software expects a mike or whatever to be plugged in. |
|
| Back to top |
|
 |
|