4

My audio is routed through a second device (default), which then feeds to the primary. Changing the volume of the second device doesn't affect anything, even if I set it to 0.

Windows requires the default device to be the one that is controlled by the volume keys on the keyboard.

Is there a way besides changing the default, to control which device is controlled by the volume keys?

p.s. Volume keys is referring generically to what could be differently physically implemented (a thing that sends vol up/down characters)

Also, I'm using Win8.1, if that changes anything.

7 Answers 7

4

I've had your exact problem, and I've come up with a solution, though I would like a more permanent one. Answer found here

In short, I used Nircmd to get some console commands to change the volume of the non-default device and then I used AutoHotKey to hook my volume keys to the those commands in order to adjust volume. You could probably figure out the volume controls in AutoHotkey to skip using Nircmd in the first place, but I couldn't figure them out.

It's working perfectly so far, and the only thing I miss is the volume bar display that shows up when I change volume.

1
  • Awesome answer. I no longer use this audio setup, but this would definitely solve the original problem. Have a +1. Feb 14, 2017 at 0:32
2

Seeing how I ran into the same issue and this came on top of google:

As far as I know there's no way to do this in standalone windows. There's however an application called volume2 which allows you to pick an audio device to use and set up keyboard shortcuts to control the volume of that device using the original volumeup and volumedown keys. It also comes with lots of other interesting features but you don't have to use those.

2

BLARG's answer worked for me, but I decided to see if I could get it to work with just AutoHotKey, and it turns out that yes, you can.

; Use the Soundcard Analysis script found here to set these parameters
; https://www.autohotkey.com/docs/commands/SoundSet.htm#Soundcard
DeviceNumber := 7
ComponentID := MASTER

Volume_Up::
SoundSet, +2, %ComponentID%, VOLUME, DeviceNumber
return

Volume_Down::
SoundSet, -2, %ComponentID%, VOLUME, DeviceNumber
return

Volume_Mute::
SoundSet, -1, %ComponentID%, MUTE, DeviceNumber
return

Once you've set the device parameters correctly and confirmed that it works, you can compile the script into a .exe using the AHK-to-EXE converter that comes with the AHK installation and link it in your startup folder to automatically start it at login. If you want the volume to increase/decrease more quickly, you can do so by modifying the +2/-2 value (I believe 2% is the default change per press on Windows, but the rollover may be slower than without AHK).

0
1

I updated qwertymodo's code for AutoHotkey v2.

You can directly use the name of the audio device from windows, with or without the elements in parentheses. For example, this means you can replace the number 7 with "Speakers" or "Speakers (Realtek(R) Audio)". Leaving ComponentID as a blank string for v2 gives the same result as setting it to MASTER as before.

This first code is a direct translation from v1 to v2.

#Requires AutoHotkey v2.0
; Use the Soundcard Analysis script found here to set these parameters
; https://www.autohotkey.com/docs/v2/lib/Sound.htm#ExSoundcard
DeviceNumber := 7
ComponentID := ""

Volume_Up::
{
SoundSetVolume("+2", ComponentID, DeviceNumber)
}

Volume_Down::
{
SoundSetVolume(-2, ComponentID, DeviceNumber)
}

Volume_Mute::
{
SoundSetMute(-1, ComponentID, DeviceNumber)
}

This second code is for devices that don't work with standard mute.

#Requires AutoHotkey v2.0
; Use the Soundcard Analysis script found here to set these parameters
; https://www.autohotkey.com/docs/v2/lib/Sound.htm#ExSoundcard
DeviceNumber := 7
ComponentID := ""
savedVol :=  0

Volume_Up::
{
SoundSetVolume("+2", ComponentID, DeviceNumber)
}

Volume_Down::
{
SoundSetVolume(-2, ComponentID, DeviceNumber)
}

Volume_Mute::
{
global savedVol

currentVol := SoundGetVolume(ComponentID, DeviceNumber)
if (currentVol > 0)
{
savedVol := currentVol
SoundSetVolume(0, ComponentID, DeviceNumber)
} else
{
SoundSetVolume(savedVol, ComponentID, DeviceNumber)
}
}
0

I'm not sure exactly how to do this, but i may be able to give you a few starting points. Right click the Realtech start icon and go to audio devices. Select the device you wish to be able to modify and go to properties. Go to the advanced tab and check "allow applications to take exclusive control of the device". I'm not sure which driver set/ software directly controls your volume keys, but that should allow it to take control if you specify. Hope this helps. (Generally this is used for software media players, but it may apply to buttons as well)

3
  • Built-in windows 8. Did I badly word this? I want a different device to be controlled by vol keys. NOT default Jan 13, 2014 at 3:02
  • Sorry man, not sure how to modify it in windows 8 =( Good luck to you sir.
    – jak138
    Jan 13, 2014 at 3:04
  • Your wording is ok, the last line clarifies it. The buttons usually have separate settings from realtech settings. At least that has been my past experience.
    – jak138
    Jan 13, 2014 at 3:06
0

I found an easier way as of Windows 10: you go in to your advanced audio settings and change your default master volume to the device you want to change the volume on, then change everything else to the actual device. Shown here:

screenshot showing the individual output device settings per-application as added in Windows 10

You can see my Discord and Chrome set to my virtual CABLE input, then at the top it's set to my actual device where I need to change the volume. Easy.

1
  • Fantastic first answer! I am glad to see Microsoft fixed this pain point in the operating system now :) Aug 7, 2020 at 4:40
-1

I found a different solution which some might wanna use instead of AutoHotkey

I posted it on Another post here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .