Basically my question is similar to this one: depending on my location, my Mac is connected to different audio devices.
Often, the Mac remembers that when I connect it to my dock in the office, that it should pick my USB headset for input/output. But not always.
I think there aren't any existing apps to help with this, but I am wondering: are there any "easy to use, say scripting", interfaces that one can use to write a bit of code that reacts to "events" and that could update sound settings programmatically?