Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C++ (http://www.programmingforums.org/forum15.html)
-   -   How to detect if speakers are present in windows (http://www.programmingforums.org/showthread.php?t=13620)

lucifer Jul 25th, 2007 8:24 AM

How to detect if speakers are present in windows
 
hi
Can some body please tell me how can i find if speakers are connected to mine computer .I am using windows SDK .

DaWei Jul 25th, 2007 8:32 AM

Signature rule #3: Font size - Please don’t increase font size beyond the default text size. No magic in that.

Random-Spirit Jul 25th, 2007 10:43 AM

>Can some body please tell me how can i find if speakers are connected to mine computer .I am using windows SDK .

Have you tried searching the Windows SDK? Its not just there to take up a gigabye or so of your hard disc, how about learning how to use it.

If you are using the standard analog jacks that computers have used for years there is probably not a standard Win32 way for doing it. Some sound card drivers may or may not have some detection mechanisms so they can show this sort of information in driver control software. It is something that is most probably out of the scope of Win32. I would not be completely surprised if there is some way of doing this with DirectSound, but don’t count on it.

ZenMasterJG Jul 25th, 2007 5:29 PM

Why do you want to detect the speakers?
Usually its not something you'd worry about. Just play the audio and if the user wants audio (speakers attached, volume not muted.) they'll hear it.

Brent Jul 25th, 2007 9:28 PM

research the windows multimedia API, there is the waveOutOpen() function that opens an output device but will first check to see if a sound card is installed, and if i recall correctly, there is a flag you can use to quiery the sound card to see if and output device is present.


All times are GMT -5. The time now is 3:09 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC