First, you need to know what audio system your desktop is using.
If it's PulseAudio (a popular choice, these days), then some API documentation can be found here:
http://freedesktop.org/software/pulseaudio/doxygen/
I'm not totally sure if that's the right API for your needs (controlling other applications) but it's a starting point, and I'm sure further surfing/googling will get you there.