How to toggle between default sound device using hotkey

Page 1 of 2 12 LastLast

  1. Posts : 72
    Windows 7 Ultimate 6.1 x84
       #1

    How to toggle between default sound device using AutoHotKey


    Edit: See second post. Found script for AutoHotKey but not sure how to compile or use it ? Also when ever I plug a USB device in it changes default sound device from Line 1 to SRS.. I usually plug my Smartphone on for charge every day using USB so it gets annoying.

    I'm using two audio enhancement plug-ins SRS Audio Sandbox & Breakaway Audio Enhancer. SRS uses Realtek HD Audio Output while breakaway uses SRS Audio Sandbox and when I load my computer for the first time SRS automatically sets SRS Audio Sandbox (WDM) as the default sound device meaning each time I have to open playback devices and change the default sound device back to Line 1 (Breakaway Pipeline) in order for the sound to work.

    There seems to be no way to disable SRS from changing the sound device when it starts/loads for the first time so is their a way I can a hotkey shortcut key to simply change default sound device to Line 1 ?

    Audio Device: Breakaway
    Input > Breakaway Pipeline 1
    Output > SRS Audio Sandbox


    Audio Device: SRS Audio Sandbox
    Input > SAS is the default sound card
    Output > Realtek HD Audio Output

    Thanks
    Last edited by Swiftkidd; 14 Nov 2013 at 14:18.
      My Computer


  2. Posts : 72
    Windows 7 Ultimate 6.1 x84
    Thread Starter
       #2

    Source:
    Windows 7 Tip: How to change the default audio device with a hotkey

    Windows Vista and 7 have a new audio subsystem, with lots of neat features. It is not, however, without its quirks. One such quirk is the inability to automatically change the default audio device; you must do it manually.
    This means that if you have both headphones and speakers plugged into your computer, whenever you want to pipe all sound through the headphones you must right-click the volume icon, select Playback devices, go to the device you wish to set as default, right-click it, and select Set as Default Device. Sounds like fun, right? Now try doing this 5-6 times a day.
    Incredibly enough, I could find no command-line utilities to automate this simple operation. I thought I might build something myself, so I started digging deeper. It turns out Microsoft seems to have done this by design; they wanted to prevent programs from changing the default audio device on users, because this can lead to a very bad experience (imagine a game which suddenly changes the audio to the speakers, when you wanted to listen to it using your earbuds).
    I did try a couple of utilities which claimed to do this, but they were really bad. At this point, I did what I do every time the going gets rough: I turned to AutoHotkey. This amazing free automation program has a solution for just about anything, and indeed, AHK user Veabers already created the exact script I wanted in 14 elegant lines of code. This script toggles between two audio devices in about half a second on my system. Just hit Win+Shift+A, and you switch to the other device. Here's the whole thing:

    #+a::
    Run, mmsys.cpl
    WinWait,Sound
    ControlSend,SysListView321,{Down}
    ControlGet, isEnabled, Enabled,,&Set Default
    if(!isEnabled)
    {
    ControlSend,SysListView321,{Down 2}
    }
    ControlClick,&Set Default
    ControlClick,OK
    WinWaitClose
    SoundPlay, *-1
    return


    Voila! The only thing I changed was the default key-binding, because the author's default did not work for me.

    Last edited by Swiftkidd; 14 Nov 2013 at 17:13.
      My Computer


  3. Posts : 1,486
    Windows 10 Pro
       #3

    ok people, here is my modded script to toggle between devices. it is an .exe file. this means you have to click on the .exe file to switch the default audio device. HOWEVER, all you have to do is place the .exe file in some folder like documents, than create a shortcut for it. you can than place the shortcut anywhere you like. I put it on my desktop. you can can assign a key stoke to launch it. I did Ctrl+Alt+C to launch it and have it switch it automatically. you also can change the icon of it too.

    NOTE: this is an .exe file. so the ONLY way to activate it is to click on it. UNLESS you created a keyboard shortcut.

    just so you guys know, I used a similar script like the one above and created it into an .exe file with the program used above. The .exe compared to the actual program is that you do not need to have the program constantly running and boot up with windows for this hotkey to work.

    I chose Ctrl+Alt+C because I have Ctrl+Alt+Z and Ctrl+Alt+X used to switch between active power plans. heres the .exe. Enjoy!
    How to toggle between default sound device using hotkey Attached Files
      My Computer


  4. Posts : 72
    Windows 7 Ultimate 6.1 x84
    Thread Starter
       #4

    Hey,

    Thanks for the reply, before I saw your post I found utility app called Audio Switcher version: 1.5.2.9 which seems to have solved my issue without needing to toggle default device on startup. It has two options which allows users to set a device as a 'startup device' and as a 'favorite device' which I've set my Line 1 to both of those so when ever I switch on my PC it automatically sets Line 1 as default device. Plus it has hotkey capability which I use when ever connecting/disconnecting usb device due to it changing my default audio device

    I will give your script ago as well but it seems Audio Switcher will be better suited as it allows for startup device and favorite device it just a shame both require .exe to be running continuously
      My Computer


  5. Posts : 1
    w7 64b
       #5

    IS there any way to make the EXE bring up the volume menu minimized? So that it doesnt minimize fullscreen games?
    But thanks a bunch for that
      My Computer


  6. Posts : 2
    windows 7 home Premium x64
       #6

    ... miss post soz
      My Computer


  7. Posts : 2
    windows 7 home Premium x64
       #7

    [QUOTE=Sanantras;2791724]Hi, new to the forum and have been looking for this issue all over the web and have to say that N00berG00ber has fixed my issue in a few masterful keystrokes. THANK YOU
      My Computer


  8. Posts : 1
    FL
       #8

    Thanks N00berG00ber! You are a pimp!!!
      My Computer


  9. Posts : 1
    Windows 7 Ultimate x64
       #9

    Makes switching between my Logitech H800 wireless headset and speakers as easy as Ctrl+Alt+S! Thanks a ton!
      My Computer


  10. Posts : 4
    Windows 7 Ultimate x64
       #10

    I tried this (Noober's program) but all it does is open the Playback devices window then close it, but the same device stays selected instead of switching devices. Any ideas?

    I'm using the Audio Switcher program now, so far seems to work pretty well, just wish a hotkey could be set to cycle through the favorites.
    Last edited by vertigo220; 09 Aug 2014 at 16:02.
      My Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 20:16.
Find Us