DIY Multi-Input Audio
The circuit you are looking for is called a "passive summing circuit".

It consists merely of resistors. The circuit does not completely prevent a device from backfeeding the rest, but it ensures that if two devices are driving a signal, they will not be damaged.

There are numerous circuits and references available from a quick web search, but here is an example:



You can add inputs as needed, to a certain extent (a large number of inputs may require an active summing circuit).

In your case, you also want stereo, so you need two circuits, one for each side (L/R). As for values, they're non-crucial, but they should be equal, and in the range of 5kΩ to 25kΩ. Others may have stronger opinions on values.