Welcome

You have reached the blog of Keith Elder. Thank you for visiting! Feel free to click the twitter icon to the right and follow me on twitter.

Windows 7 Sound: Stream Switching in the Real World

Posted by Keith Elder | Posted in Windows | Posted on 15-05-2009

If I am sitting at my computer I have music playing.  I used to not be so bad about having to have music playing.   But lately I can’t stand the silence, I have to have some type of noise (I know many developers share the same sentiment).  Since I need music to work and my wife needs silence to work, I kept having to swap from speakers to headphones.  This was a problem, until Windows 7.

The standard household ritual goes something like this:

ME Singing: “…. you give love…. a BAD NAME…”

Wife:  “…stop singing I’m trying to work….”

ME:  “… ok, sorry, got carried away, really good song there”

Wife:  “…. and put your headphones on…”

ME:  “… yes dear…”

When running Vista this meant I had to stop whatever it was I was listening to right in the middle and shut the application down.  Then I had to switch my default sound device from speakers to headphones.  Thus whatever was playing (Zune, Pandora or whatever) I’d have to shut it down right in the middle of whatever it was I was listening to.  Then I’d press the Windows key on the keyboard and type “sound” as shown below to open the sound settings and move the default device to my headphones.  Then I’d restart the app and music would be playing on my headphones. 

image

This was painful. 

Windows 7 makes this story much easier and works the way I had originally thought it should.  In Windows 7 I press the Windows key on the keyboard and type “sound” as before in Vista.  First thing you’ll notice is the search screen looks completely different and provides more options because the search has gotten better.  The UI is now just about search as the other navigation options have been removed. 

image

There are three options listed in the control panel section and two of them take you to the exact same place, one is just more explicit (which is good).  When clicked the standard sound settings dialog opens up.

image

As you can see above I currently have the headphones set as the default device and you can also see music is currently playing.  Selecting the speaker option and clicking the button will immediately switch all the audio to the new output.

image

image

Finally this works as I would expect in real-time.  I can now switch from speakers to headphones within about 3 seconds now. 

But!  Sound in Windows 7 doesn’t stop there though.  There are other features in the sound subsystem of Windows 7 including the ability to handle communication devices.  For example, if Windows detects you received a telephone call via your PC (think Live Messenger, Skype, etc) there are several options that allow you to mute all other sounds on the computer or reduce the volume.  This is called “ducking”. 

image

If you want more detailed geeky information about sound in Windows 7 watch Larry Osterman’s video on Channel 9 which includes demos of stream switching and ducking.

Comments (4)

The only app that doesn’t do this for me is Audition, other than that it is gravy.

Nice feature. But doesn’t work that way in Reallife. Most Applications don’t switch the Audiodevice… 🙁

ya this is fantastic! had the same problem with bluetooth. rediculous pain, but they finally seemed to have fixed it.

oh and i see you’re using some fancy USB headphones and not talking about just plugging in headphones – which shuould of course always work fine unless you dont have a proper driver installed

Well this is nuthin but PR, its a longwinded and unecessary procedure…we should not have to go there, simply have the provision maybe in the rh corner to switch on and off both at whim

Write a comment