Unfortunately, DVI only contains video signal and no audio. I assume your Xbox is connected using HDMI cable.
You'll need something like this - http://electronicsusa.com/mk1and2.html
Take the audio output from the PC and connect to Source 1 of the switch then the TV audio out to Source 2 of the switch. Connect your speaker in to the output of the switch.