I got sick of right-clicking on the sound button, selecting preferences, then selecting output device. Annoying!
So I finally got around to automating it, then even added buttons to the menu, and from there to the task bar. I'm on Linux Mint 17 (Mate) at the moment. Here's how it works, after the jump: