A hotkey to switch between headphones and speakers. Soundswitch.

I use USB headphones. I also use regular speakers connected to my sound card. Windows makes it a multi-step process to switch from headphones to speakers.

I tired of this, so I wrote a program to rectify the situation and I called it Soundswitch because I’m a wordsmith. You can find this program here:

Available here.

Basic Use and Installation

Unzip it to the directory of your choice.

Look in the Sound applet in control panel to see which two sound devices you want to switch between. In the following image, the two I switch between are labeled 1 and 4. Thus, in the ini file, I used 1 for Source1 and 4 for Source2.  Update:  Note that the number of items will vary based upon whether you have “Show Disabled Devices” and “Show Disconnected Devices” checked (Right click anywhere in the list to see these).  For the purposes of Sound Switch make sure both options are checked before counting the items. The screenshot below doesn’t reflect this.

sound_panel

The ini by default has the switch key assigned to Ctrl-Alt-F12. Edit this as you like.

Tested on Win7 x64 and Vista x32.   Update:  XP no longer works with the latest updates.  Use this older version for XP compatibility:  soundswitch

Any comments on this are welcome and I’ll try to fix any bugs reported.

Version 2 Notes

I’ve added a good number of features in the latest version. All accessible through the .ini file.

  • “Scroll” through each enabled item in your Sound panel.
  • Hide the tray icon
  • Switch between two speaker configurations for your current active playback device
  • Switch/scroll just the default comm device, default playback device, or both
  • Hotkey to terminate the program
Leave a comment ?

292 Comments.

  1. I keep getting an error that says “error setting device to ^#[f11]”

    Any help on this?

  2. Dustin,

    Your program was working great with the Logictec stereo USB headset, but today I got in the Corsair HS1 headset which handles up to 7.1. When trying to run the soundswitcher it errors with “Error setting DisplayDeviceInfo to ^!{F8}.”. I am using the 3.0dev1 beta version and have the Source1 set to Corsair and Source2 set to Speakers. I tried changing Speakers Set1 from Stereo to 7.1 Surround and 5.1 Surround with the same error. I tried version 2.03 also with the same results. Any suggestions?

  3. Forgot to mention I’m using the 32 bit version and am on Windows 7.

  4. @Dantego: I compiled a test version for you (actually for anyone who is getting similar “error setting X to X”). The only change is that I don’t terminate on hitting a hotkey-setting error. I just pop up a traytip to warn you and continue running.

    There’s some key combinations I can’t set the hotkey to on some systems, and I haven’t figured out what that’s all about.

    Get the test version (3.0dev2) here:
    http://github.com/therms/soundswitch/downloads

  5. It won’t let me download either of the dev2 versions. I can download the dev1 fine. Getting the error “Unable to download soundswitch_x32_3.0dev2.zip from github.com. Unable to open this Internet site.”. I see that the file has been downloaded by others so I’ll try again later tonight. Thanks for the quick response. I’ll let you know how it goes.

  6. Still can’t get either of the dev3 files – same error. I did notice that the counter increments even though I can’t get the files. Any ideas?

  7. I’ll check the downloads tomorrow morning.

  8. That worked, I was able to get the files. I’ll check and let you know if that fixes the problem.

  9. The new version works great and doesn’t error out. Appreciate the quick response and the great program!!!!!!!

  10. First of all, thanks dustin!!
    But i have a problem with the program.
    When i try to switch between my surround headset and my stereo speakers with Ctrl + Alt +F12 , only “Sound” shows up (from windows, like on the picture). So the sound doenst switch between my headset and my speakers but it only opens “Sound”. Is this normal? i tried all the other hotkeys too but they all do the same: Open “Sound”

  11. @Smurf9852: Which version of Soundswitch are you running?

    Which version of Windows are you running?

  12. I am using v2.03 and my O.S is Windows 7 Home Premium 64 bit.

  13. Try the dev version I posted a few days ago here in the comments.

  14. Still the same; Only Sound shows up but no switch!

  15. Ok, I’ll look at this in more detail in a day or two.

  16. @Smurf9852: I got same problem in same system. But still, Thank you Dustin for making this script.

  17. Any Suggestions??
    Somebady?
    Thanks.

  18. I this can’t reproduce this bug, so I don’t know what’s causing it. I’ll put out a debug version if someone I’d willing to test it.

  19. This is very useful. However, I have one problem,; maybe someone can help me. If I’m in a fullscreen application (like Starcraft 2 or a VLC Media Player) and I hit the hotkey, the program is minimized (or at least the Start bar comes into view) and I can see the program running. Is there anyway to make this run in the background without kicking me out of whatever I’m doing?

  20. @Luke: That’s largely up to the game developer. I suppose I could code in support for making Soundswitch emulate manually restoring a program to fullscreen.

    I’ll add it to my to-do list.

  21. you are a frickin genius.

  22. Great script. Just bought the HS-1200 from Creative and thanks to your script and the headset having a simple hotkey to enable call answering I now have a hotkey to switch audio devices while I’m walking around my room or the room over.

    You are the reason I’m not about to return this product on one of the busiest days of the year. Many thanks.

  23. Same story here, couldn’t believe switching wasn’t simpler.
    Thanks a lot for your script, makes my wireless headset complete.

  24. Thank you so much! Works like a charm.

  25. I Don’t get it?

    How do u switch? >.<

  26. I would like to use my keyboard’s power off key – how do I specify this?

  27. as far as I know you would have to:

    a – disable the power off key from turning off your keyboard via some kind of software given to you by the keyboard manufacturer… usually you can alter any hotkey with that software. I don’t know about the power button though.

    b – if you can disable the power button from turning off the keyboard you would then have to find out if that key even has a proper windows key assignment, not just an I/O switch for the circuit board within the keyboard itself. You could try ventrilo for checking hotkeys. That’s how I got my wireless headset to work with this script.

    Hope that helps!

  28. hello Im useing Win7 64 Enterprice when i’m trying to install the Program/software some Error shows up “Error Setting SwotchSpeakerCount to ^!{F)}. any way that i can fix this? 🙂

  29. I got the same issue with Smurf9852.
    My OS win7 64 ultimate.
    thx for the script though.

  30. @arst: What language do you use in Windows?

  31. Jason D. Sustar

    I have been looking for a program like this for a long time and finally happened to stumble across this. Thank you for a great working tool!

  32. Hi Dustin. I have a question. I have a set of REAL 5.1 headphones (Roccat Kave 5.1 headphones – real, not emulated- ), pluged in the rear panel of my mobo (3 jacks conectors), and my stereo speakers in the FRONT panel as it would be a speaker set, so I have all inverse xD, my main set is the headphones 5.1, and my secondary is the speaker set in the front panel (at headphone front output, obviously)
    Now, I have configured audio as 5.1 system, and I hear sound in BOTH channels; Headphones are awesome, runs great, but I don’t have a stereo mix in speakers, so I lose chanels and sounds if I’m using just the speakers, So, my question 😳 :
    I could with this program switch between 5.1 and 2.1, or make that I could get a stereo mix in my speakers, AT THE SAME TIME that a 5.1 mix in my headphones?
    Thanks, and sorry for this messy question
    Regards.

  33. Thanks for this great and useful app!

    I have a quick question; I am using this program to control the sound devices from the remote control.
    If I press activity 1: I want sound from TV
    If I press activity 2: I want sound from HIFI

    The problem is that the remote doesnt know the state in which it is before switching sound devices. So, it may switch sound devices when it doesnt need it:

    Is there a way to tell soundswitch:
    if hotkey= “x” go to source 1
    if hotkey= “y” go to source 2

    So, the idea is not to switch. Just go to the right source. If you are in the right source, it will stay where it was!

    Thanks again

  34. @pj: No way to do that currently, but it’s a good idea and I’ll add it to my to-do list. Expect implementation within a month.

  35. Excellent news.

    Thanks. Keep the good work!

  36. Hi! I just installed version 3.02 on vista x64 and I have the same problem as Smurf9852 mentionned above: sound window is opening without doing anything instead of switching devices. Logitech 930 USB headset and speakers. Maybe you found the problem? if you want us to use a debug version let me know.

  37. @Cylis: Do you use English as your language in Windows? Soundswitch currently depends on the English names of some of the items in the Sound dialog…

  38. Cylis’ girlfriend here. We indeed use a french version of Windows… 😕

  39. Hmm weird, “Script Paused” is checked and I can’t get it unchecked, how come? :O

  40. @Marc: It sounds like you’re on an older version. Try the beta version mentioned near the beginning of the post in bold and italic..

    @Cylis: I’m pretty sure this boils down to the fact that I use text from the English version of Windows to select the right options. I’ll implement a translation file soon where you’ll be able to specify the translation in your language…

  41. Hi so far i have tried two different hot key programs and have had the same problem with both. In the first spot is my headset, then a front jack headset (not used), then two digital audio (no idea what they are but they dont output sound), and then my tv. I want to switch from my head set to my tv, so i would use the number 1 and 5. But no matter what numbers i put there it cycles through the list and picks the first Digital Audiop (s/pdif) but that doesnt actually make noise come out anywhere. The first hot key program i used did the same thing. If i disable the Dig Audio things then it works fine, but when i restart my computer it says my tv isnt plugged in, but obvious it is because i can use my computer, but its not an option for sound output (its HDMI). So after a fresh restart it selects the digital output device no matter what number I use.

  42. Hey bro, vista64x here. I get an AutoIT error upon start-up saying. Line 1771 Error: Variable used without being declared.

    Any tips?

  43. Dagens fotnoter… #7 « vi-kan.net - pingback on April 20, 2011 at 3:58 am
  44. hello. dunno if you’re still watching this thread but i’d like to be able to bind devices to specific keys.
    ex:
    ctrl+alt+1 = Sound device 1 (TV)
    ctrl+alt+2 = Sound device 2 (HIFI)
    ctrl+alt+3 = Sound device 3 (Headphones)

    is that possible in the current version?
    or is that something that you could make?
    Cheers for a gr8 script! using scoll device now to change between them

  45. How do you disabl th program?

    Evry tim I prss and E lowrcs th sounds proprtis box opns.

    Problmatic for Email

  46. @Gretchan: just use the icon in the system tray by the clock.

  47. nice that would be sweet

  48. My lowercase “e” is back. Here’s how I disabled the program :

    It doesn’t look like the program installs itself in the normal fashion. If
    you haven’t already, restart the system. It looks like that will clear this
    out. Another thing to try, is to open Task Manager (Ctrl+Shift+Esc), click
    the Processes tab, locate sound_switch.exe, right-click on it and select End
    Process. Say Yes to the Windows warning.

    So for XP, it looks like this program won’t work.

  49. @Gretchan: That seems silly.

    Why didn’t you just use the icon in the system tray and click Exit?

    Also, it says right there in the description that it doesn’t work with XP.

Leave a Reply to invermereCancel reply

Trackbacks and Pingbacks: