Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jul 25th, 2007, 7:24 AM   #1
lucifer
Programmer
 
lucifer's Avatar
 
Join Date: Oct 2005
Posts: 84
Rep Power: 4 lucifer is on a distinguished road
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 .
__________________
"You're good... but me, I'm magic"

Last edited by lucifer; Jul 25th, 2007 at 7:36 AM.
lucifer is offline   Reply With Quote
Old Jul 25th, 2007, 7:32 AM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Signature rule #3: Font size - Please don’t increase font size beyond the default text size. No magic in that.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Jul 25th, 2007, 9:43 AM   #3
Random-Spirit
Unverified User
 
Join Date: Jul 2007
Location: England
Posts: 22
Rep Power: 0 Random-Spirit is an unknown quantity at this point
>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.
Random-Spirit is offline   Reply With Quote
Old Jul 25th, 2007, 4:29 PM   #4
ZenMasterJG
Hobbyist Programmer
 
ZenMasterJG's Avatar
 
Join Date: Nov 2004
Location: Boston, MA
Posts: 148
Rep Power: 4 ZenMasterJG is on a distinguished road
Send a message via AIM to ZenMasterJG
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.
ZenMasterJG is offline   Reply With Quote
Old Jul 25th, 2007, 8:28 PM   #5
Brent
Highly Adaptive Penguin
 
Brent's Avatar
 
Join Date: May 2005
Location: United States
Posts: 251
Rep Power: 4 Brent is on a distinguished road
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.
Brent is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Command Prompt SkyPioneer Coder's Corner Lounge 5 May 3rd, 2006 10:07 PM
Search for and close open windows badbasser98 C++ 13 Feb 27th, 2006 12:04 PM
Windows Vista, well sort of coldDeath Coder's Corner Lounge 21 Sep 6th, 2005 1:00 PM
How do I use perl to detect active windows on desktop? mephisto04 Perl 1 Aug 25th, 2005 12:49 PM
Net Group /ADD (on a windows box, non domain controller) Infinite Recursion Other Programming Languages 1 Apr 13th, 2005 2:27 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:29 AM.

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