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:

soundswitch_v2.03 – (latest version)

update:  There’s a beta-quality release of 3.0 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
Related Posts
Leave a comment ?

228 Comments.

  1. Dustin:

    Thanks for the response.

    We’re all having exactly the same experience (read any/all of the comments from any/all XP users in the thread above). We download and install the program and since none of us know what to put where in the ini file or even where to look in audio properties or device properties to determine sources, we have absolutely no idea what entries to make in the ini file to configure the program. There must have been step-by-step instructions that you posted when you first wrote the program for XP, like those still posted for win7. Do you still have those so we know what to open, what to enter in the ini file and how to get beyond the green icon in the taskbar that has no functions other than exit?

    We came here hoping we’d found what everyone else came here to find only to discover that our OP (that fully 50% of windows users still use, BTW) is no longer supported. If there are no instructions available from the creator of the XP version (you), then there is no way to use the XP version and you might as well eliminate it from this thread and tell XP users to look elsewhere.

    Thanks,
    Gary

  2. So what experimenting did you do to find out what Source1 and Source2 correspond to?

    Since the purpose of this program is to switch sound output devices, I’d assume I wrote it to correspond to the Sound playback dialog devices as show here…

    http://bit.ly/bxXRgu

  3. Forgive my matter-of-factness here. I’m not trying to be argumentative or problematic. I’m just trying to get an answer for those of us using XP.

    Since the dialog box your link took me to is the only dialog one can access in WinXP for audio properties, that is exactly my (our) problem. I currently have my USB headset plugged in to an available USB slot. I also have my stereo speakers plugged in to my sound card. However, when the dialog (yes, the same one you directed me (us) to in your link) comes up in audio properties in XP, even with both items properly plugged in their respective jacks, ONLY the currently assigned/selected item shows up in the drop-down – in my case, the USB headset.

    So this is exactly my (our) question – how do we find the available sources to choose from in XP? Once we find them, how do we number them and designate them in the ini file in soundswitch so we can switch between them? I have looked everywhere and tried everything you can imagine with no more success than the other 6 or 7 people who wrote earlier in this thread, asking how to use the XP version of your program but never got an answer. Without the steps outlined for us by the person who wrote the program, it is impossible to use the program because it is impossible to figure out. Since you originally wrote the program for use in WinXP, I was just hoping, on behalf of myself and the other 6 or 7 who asked previously, for you to outline the step-by-step process for us to use the legacy program in WinXP.

  4. ONLY the currently assigned/selected item shows up in the drop-down – in my case, the USB headset.

    How do you select the “currently assigned/selected” item if there’s no other items in the drop down?

    I have no recollection on how this works in XP.

    Here’s a screenshot showing how it should look…

    http://bit.ly/aF6lTq

  5. You’re right, there is a second item in the drop down. My two items are: Logitech USB Headset as default and Realtek HD Audio Rear Output in the dropdown. So what do I do next?

  6. Dustin:

    Thanks for your responses. I know you have moved beyond XP and don’t blame you. Clearly there are no step-by-step instructions for the XP program or you would have posted them.

    I have spent a couple of hours this evening playing with all configurations in the ini file and while I do get the program to ‘work’ (I have the hotkey set to Alt+F12 and when I perform that key press it brings up the audio properties box), however it does nothing but bring up the properties box requiring me to make the changes there, no matter what numbers I assign as the two sources in the ini. It also removes the volume icon from my task tray for no reason.

    Bottom line, I don’t think this is worth the effort to try to make it work in XP. I appreciate your work in making a program that apparently does work in Win7 and the time you have taken to respond to my previous posts, but I am moving on.

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

    Any help on this?

  8. That usually happens when something else is using that hotkey.

    Does it fix it if you use a different hotkey?

  9. 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?

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

  11. @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

  12. 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.

  13. 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?

  14. I’ll check the downloads tomorrow morning.

  15. Ok, I reuploaded the files, you can try again.

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

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

  18. 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”

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

    Which version of Windows are you running?

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

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

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

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

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

  25. Any Suggestions??
    Somebady?
    Thanks.

  26. 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.

  27. 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?

  28. @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.

  29. you are a frickin genius.

  30. 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.

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

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

  33. I Don’t get it?

    How do u switch? >.<

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

  35. 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!

  36. 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? :)

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

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

  39. 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!

  40. 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 :oops: :
    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.

  41. 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

  42. @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.

  43. Excellent news.

    Thanks. Keep the good work!

  44. 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.

  45. @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…

  46. Cylis’ girlfriend here. We indeed use a french version of Windows… :???:

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

  48. @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…

  49. 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.

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">