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. Little Remind =)

  2. Works like a charm. Just what I was looking for to easily switch between headphones and speakers. Thanks for sharing.

  3. Great solution that works.

  4. Perfect, thanks!

  5. You are the best. Thanks

  6. life changing =) thanks

  7. Can you call it from a batch file used to launch an aplication.

  8. Truly Awesome, thankyou!

  9. Thanks heaps, I am clickin up on your advert links to repay the favour, hope others do aswell.

  10. Thanks a lot its working great 😀

  11. Did you figure out how fix the thing where it just brings up the sound config page ?

  12. @jjubic: Not currently, but I’ll put it on my to-do list.

    @Grevy: I cannot reproduce this bug, so I haven’t figured out a fix yet.

  13. I like the concept of running from a batch/command-line as this would solve the very problem I was hoping your program would solve. However, the machine I’m working on is an XP machine. Any possibility this item could be XP-compatible, too?

    Looks like a great tool, Dustin!

  14. Thanks so much! This is incredible. This makes switching between my office and living room easy again. Really appreciate the work!

  15. Great little piece of software. It’d be great though if the icon changed to reflect what speakers/devices were active.
    Thanks very much

  16. You, my friend, are awesome. Thank you for putting a tool like this out for all to use! I’m using this to switch between the speakers at my desktop and the surround sound of my receiver (sometimes my wife doesn’t want to hear the “noise” I’m listening to). BTW – running Windows 7 Pro.

  17. This is exactly what I needed! I was just getting ready to dive into the Windows API to figure out how to write something to change my audio from 5.1 (speakers) to stereo (headphones). This saved me a bunch of time. I’d love to know how you did this.

  18. @Josh: The Windows API was too much trouble, so I just automated the Sound control panel applet UI.

    I’ll be open sourcing the code sometime this summer so you’ll be able to see how I did it exactly soon.

  19. Just FYI – the 2.03 version doesn’t work with Vista 64, but the XP-compatible version works like a charm.

    3 Thumbs Up for this awesome little piece of software!

  20. Amazing application kudos to you for taking matters into your hands and sharing it with the world.

  21. Dustin,
    Does this work between Wireless headphones and wired speakers.
    I can switch between the two if I am watching a video on youtube via the Sound Panel.
    But when I am streaming a movie online, the sound will work with only the first device that is on for eg: If I have my Wireless headphone on, the sound will come thru it. If I have my wired speaker on, the sound will come thru it but will not revert.
    Vista 64 Bit Home premium.

  22. @Dustin: Glad to hear it.

    @Anonymous with headphone problem: I think some programs have difficulty switching sound devices while they are already running. I don’t actually switch sound devices, but sound output (stereo/5.1), myself, so it might be similar.

    For instance, if I have skype running with a call on and I’m on 5.1, I have to end the call in order to be able to switch back to stereo or skype freaks out and says it can’t find the sound device. Once I’ve switched, I can restart the call no problem and it will be on stereo.

    So, if that’s the case, the problem is likely with whatever program/browser you’re using to stream your movie.

  23. can you talk me through how to do this on xp as i downloaded the xp one but dont know how to install and use it.

  24. Hi, first of all thank you Dustin for this.
    I saw same issue as Anonymous reported, about screen flicking but nothing changing. I figured out it happens because I on windows 7 had disabled my other device.
    So I just needed to have both enabled, but only one active (naturally) then it changes as it should.

    And lastly would you consider adding quick change to the tray icon? I could use that when controlling only using the mouse while away from the keyboard.

    But again, thank you. I think I can even instruct my wife on how to change the output now 🙂

    br
    Las

  25. Well,
    i’ve been using it for a few months now, without any problems.
    But now it’s starting to bugg a bit.
    Each time I press my hotkey to switch from headset to speakers, it buggs out a bit. I need to press it a couple of times before it switches back.
    But this only happens from headset to speakers, not from speakers to headset where it works propperly.

    Any thoughts would be great.

    • I’m not sure. It shouldn’t matter which device you’re switching from/to since Soundswitch is just selecting items from a list and has no knowledge what kind of devices there are.

  26. well,
    that is what I guess.

    BUt maybe it has artificial inteligence ^^

  27. I have extracted and run the legacy XP .exe file. It appears in the taskbar but Script Paused is checked and I cannot uncheck it. Any suggestions?

  28. I have the same problem than anonymous.. win 7 64 but my system is in french… it’s related to the problem?

    I changed the sources number in the ini file and I tried other shortcuts but i meet the same problem.

    Thanks! it seem a good software, exactly what I seach…

  29. I’m going to spend some time this month looking the code on this over and see if I can’t fix a few bugs and add a couple requested features…

  30. love this damn good software:),have been looking for such kind of soft for long.
    though cant use it now,same problem as anonymous.
    looking forward to see the fixed version^ ^

  31. Like RS above (31 August), I downloaded the XP legacy version and it appears in the taskbar but Script Paused is checked and I cannot uncheck it.

    Would love to get this working.

    Thnx in anticipation.

  32. This is a great little app, I myself was getting annoyed with the exact same situation you were in and four mins of playing with this app has fixed it forever.
    Thanks alot

  33. I’ve started tackling some feature additions and bug fixes in earnest on this.

    Also, as soon as I figure out which license to use, I will be open-sourcing the code.

    So far, I’ve rewrote the device selection code so hopefully it will address some of the bugs people are getting with regard to nothing actually happening…

  34. I notice most if not all of the comments are for win7. i am still using winxp and i just get an icon in the corner and blinks and X and says script paused. nothing opens up for me and i cant seem to delete program either. anyway to get this to work for xp?

  35. Sounded like just what I needed. Downloaded the older version for XP and tried to install but AdWatch blocked it because it was trying to install the “HottieStar” toolbar. Not against porn or anything, but I really dont need this at work, and especially in the form of another toolbar.

  36. @PsychoPenguin:

    http://blog.contriving.net/software/comment-page-1/#comment-33571

    I’ll put a notice about this in the main article.

  37. Hey Dustin, thanks for this great app!

    Just a question:
    What would be the code to assign a hotkey to switch to ONE specific device?

    In example, I want Ctrl+F4 to make my speaker default device and Ctrl+F5 to make SPDIF the default.

    How would I do this?

  38. I don’t think that’s possible with this version.

    If you wait till this evening or maybe tomorrow, I’ll have a new version out that should allow this.

  39. Thanks for this innovative program. I still run XP SP3 and note that there are no instructions anywhere how to configure the ini file or number the devices in XP. Could you give step by step instructions for how to use this with WinXP?
    Thanks

  40. BTW – I’ve already downloaded the XP version of the program

  41. Anyway you can have a autostart option? I currently have to manually start it then click the icon in the tray to change. That would be great! Keep up the great work .

  42. Dustin:

    Again, thank for the time you have spent on such great software that fits the needs of so many. Your efforts are truly appreciated and I say that sincerely.

    That being said, there have been MANY of us post here as WinXP users wanting to know how to get the legacy version working for XP with no response. I know you’re working hard to perfect the latest version, but could you PLEASE spend some time telling us, step-by-step, how to get the XP version to work. At last count, at least 6 of us are interested.

    Thanks,
    Gary

    • It’s been over a year since I even looked at the old XP version and I no longer have any XP machines to test it on.

      IIRC, it’s not much different from the Vista/7 version when it comes to configuring it.

      Set Source1 and Source2 as per above and then set the hotkey as per above.

      You’re just going to have to experiment to figure out what exactly Source1 and Source2 correspond to.

      If I get some more feedback about what exactly is happening when people try to run the XP version, I may be able to give you some advice.

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

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

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

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

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

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

Leave a Reply to ManuCancel reply

Trackbacks and Pingbacks: