Ok, so I'm a developer and I want to figure out how to change the speaker settings programatically.

For example, I'm sure I'm not the only person with a analog 5.1 speaker system that I plug headphones into... they have a hack right on the right front speaker to do this.  But of course the head phones are 2 channel and I don't hear the 5.1.

So I want to create an application to rapidly switch the main speakers from 5.1 to 2 speaker settings.

What API do I need to research?  Should I be trying to interface with the control panel or going at the Audio API.

Thank you.