Solved

check if headphone/headset is plug or not

Posted on 2006-06-22
5
301 Views
Last Modified: 2010-04-05
do someone knows how to check if the microphone/headphone/headset is plugged/attached or unplugged in your pc?
0
Comment
Question by:drake_leon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 6

Expert Comment

by:saravananvg
ID: 16966413
Hello Sir,

  You can check the following site if this could help you in any way.

http://www.experts-exchange.com/Programming/Programming_Languages/MFC/Q_10016360.html?query=detect+microphone&clearTAFilter=true

with regards,
padmaja.

0
 
LVL 4

Expert Comment

by:kenpem
ID: 16967274
I doubt you'll have much luck with detecting what's actually plugged in. This would depend entirely on the manufacturer of the PC/sound card/BIOS, and would be really difficult to get at. Plus it would change on the next PC you come across. BUT if you can (as per saravananvg's suggestion) see that something is being "heard" on the microphone (and the PC doesn't have one built-in!) that's a good hint that a headset might be connected.
0
 
LVL 17

Accepted Solution

by:
Wim ten Brink earned 125 total points
ID: 17121136
My solution: pop up a messagebox and ask the user... :-)

I don't think most hardware soundcards have the appropiate functionality for this. Besides, you will have to deal with the possibility that multiple devices might be available on the system. For example, the user might have a regular soundcard and an additional USB device which happens to be a headphone that connects to USB. (Like the SkypePhones.) Maybe they also have a modem in their system which might also appear as an input device for sound. Thus, the best solution is to ask the user if a headphone is connected. And if it is, then ask where.

I know, this solution sucks...
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question