On Fri, 21 Mar 2008 06:34:09 -0700, Michael A. Covington
<lo**@ai.uga.edu.for.addresswrote:
"Mugunth" <mu***********@gmail.comwrote in message
news:55**********************************@e10g2000 prf.googlegroups.com...
>Is there anyway to detect whether the user has plugged in his
headphones using C#?
How?
Even the soundcard probably doesn't know. I know that laptops mute their
speakers when the headphones are plugged in, but do they do it under CPU
control, or do they just have switch contacts built into the headphone
jack
the way radios do?
Actually, the "newer" sound hardware specification does in fact include
support for detection of connection changes. I don't recall the name of
the specification off the top of my head, but I know it's pretty much
standard now and has been for at least a few years, probably longer.
Now, whether Windows provides an API to get at the information, never mind
whether this is exposed in .NET, I have no idea. But the hardware's been
supporting it, and specialized drivers have been taking advantage of it,
for some time.
Pete