![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Oct 2005
Posts: 84
Rep Power: 4
![]() |
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. |
|
|
|
|
|
#2 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
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 |
|
|
|
|
|
#3 |
|
Unverified User
Join Date: Jul 2007
Location: England
Posts: 22
Rep Power: 0
![]() |
>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. |
|
|
|
|
|
#4 |
|
Hobbyist Programmer
|
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. |
|
|
|
|
|
#5 |
|
Highly Adaptive Penguin
Join Date: May 2005
Location: United States
Posts: 251
Rep Power: 4
![]() |
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.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
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 |