Quantcast
Channel: Media Foundation Development for Windows Desktop forum
Viewing all articles
Browse latest Browse all 1079

Where is the registry key for the default audio device in Windows 7 x64?

$
0
0

My original post that I had submitted to the scripting guys, because I am trying to finish a script, was declared as needing to be posted to another forum. 

The second time I posted this question, I posted it in the Windows 7 Media forums... and was redirected here by a link provided in the only response provided. Hopefully, I will finally find my answer here; In what seems to be a vista forum... Please, I do not wish to be redirected again.

I need this for an AHK (AutoHotKey) script that I am working on that will toggle between my two enabled audio playback and recording devices.

Going through the sound device GUI is tedious as I swap devices multiple times a day.

Please remember, I need the Win7 x64 registry location for these keys. The answer posted here: Where is the registry key for the default audio device in Windows 7 did not help me as it only answers the question for Windows 7 32 bit.

I thought that it would be these locations below... but after swapping devices, and refreshing the registry, the values never changed.

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\MMDevices\DefaultDeviceHeuristics\Default\Role_0\Factor_1\Capture

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\MMDevices\DefaultDeviceHeuristics\Default\Role_0\Factor_1\Render

If I was using 32 bit windows... my AutoHotKey script would look something like this... Unfortunately I am in 64 bit.

; Toggle Sound Devices
^+PgUp::
    RegRead, Device, HKEY_CURRENT_USER, Software\Microsoft\Multimedia\Sound Mapper, Playback
    if(Device = "Realtek HD Audio output")
    {
        RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\Microsoft\Multimedia\Sound Mapper, Playback, Sound Blaster World of Warcraft Wireless Headset
        Device := "SoundBlaster"
    }
    else
    {
        RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\Microsoft\Multimedia\Sound Mapper, Playback, Realtek HD Audio output
        Device := "Realtek"
    }
    ToolTip, % "Sound Device: " Device
    SetTimer, ResetToolTip, 1000
return


; Clear the ToolTip
ReSetToolTip:
    ToolTip
    SetTimer, ReSetToolTip, Off
return

Added later on in the day:

I just ran a program that reports changes to the registry from taking 2 snapshots... I took a snapshot with realtek as my default device... and then a snapshot with my SoundBlaster wireless headset as the default device... 

Nothing changed in the registry. This is quite frustrating.

Is there nowhere in the windows 7 x64 registry where the default audio playback and recording devices are located???

Is there a specific config file that is targeted by mmsys.cpl (the sound devices manager???)



Viewing all articles
Browse latest Browse all 1079

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>