| View previous topic :: View next topic |
| Author |
Message |
Jon
Joined: 28 Apr 2004 Posts: 373
|
Posted: Thu Nov 08, 2007 2:54 pm Post subject: Get "Friendly name" for default audio device |
|
|
Hello,
I thought this would be easy to get but it seems more complicated that I thought. I am trying to get the name of the default audio device (as it appears in "sound/audio devices" in the controil panel)
e.g. "Realtek AC97 audio device" or "Creative Sound Blaster"
There is the following registry key-
HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper
that I have found which stores this information but this key doesn't seem to appear on all PC's and one PC I tried didn't display the default device in this key.
Another way i found was to call an API (possible directX). I will see if I can find a link to it when I get home. Something about enumeration audio devices and the fist one returned is the default. It is a bit over my head though.
There must be an easier way to get this information?
Thanks, Jonathan |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 6804 Location: Pacific Northwest, US
|
Posted: Thu Nov 08, 2007 8:03 pm Post subject: |
|
|
what do you need the info for?
I just checked SoundGet, but it doesn't appear to provide this. _________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM |
|
| Back to top |
|
 |
Rhys
Joined: 17 Apr 2007 Posts: 730 Location: Florida
|
Posted: Thu Nov 08, 2007 8:17 pm Post subject: |
|
|
| engunneer wrote: | | what do you need the info for? |
I'm not sure what he has in mind, but I've been kicking around the idea (haven't had time to try anything yet) of writing an app that will detect when my laptop's HDMI port is in use and swap the default output device to the digital channel HDMI uses. I currently have to manually do it, and it is a pain... _________________ [Join IRC!]
 |
|
| Back to top |
|
 |
Jon
Joined: 28 Apr 2004 Posts: 373
|
Posted: Thu Nov 08, 2007 10:42 pm Post subject: |
|
|
| engunneer wrote: | what do you need the info for?
I just checked SoundGet, but it doesn't appear to provide this. |
It's a long story
I am currently working in a primary school where we use some software called "Digital Blue Movie Creator". This software asks which sound card you want to use for recording at startup and then stores the sound card in the users local registry (HKCU). It only asks this once (although I'd prefer if it din't need to ask it at all)
The problem is when they move to a PC which has a different sound card. The sound will not work at all unless you run the audio setup wizard to change the sound card used.
I'd like to bypass the audio setup wizard and store the default sound card in the users registry (in the registry settings area for the digital blue software) when they logon to a PC or when they launch the software. |
|
| Back to top |
|
 |
|