How do I connect my speakers to two devices?

XeLink

Honorable
Dec 4, 2013
3
0
10,510
I've got a ps3 and a pc and every time I want to use the speakers on any of them I have to change where the speakers' jack goes in either on the monitor for my ps3 or straight to the pc for itself. What do I need to buy so that I have it all hooked up to the speakers and for it to work automatically depending on what device im using? thanks

(my monitor only does 1xHDMI and 1xDVI by the way)
 

XeLink

Honorable
Dec 4, 2013
3
0
10,510


But do you think it's long enough? My monitor's jack and my pc's jack are half a metre away so will both ins be able to be plugged in my monitor and pc simultaneously without any problems?
 

XeLink

Honorable
Dec 4, 2013
3
0
10,510


Seems like the way to do it, thanks!