I recently acquired two computers because the university bought new ones. I connected them to my two sound system (I managed to acquire two old sound systems some time ago) using a jack 3.5 output. I've put them on opposite sides of my room (yes it's just the one room) and I would like to sync the sound output of both pc's using wifi.
Normally I would just use vlc, correct for the delay and be done with it but unfortunately I'm not streaming mp3 files but actual sound from the internet.
I do not care if there is a delay between receiving the sound and actual playing the sound I just want these two pc's sound systems synced.
The distance between the two computers and sound systems is to long to be able to cheaply run a jack cable between them without sound quality loss.
Does anyone know how to do this?
02 Answers
Since I do not have 2 PCs readily available, I'm not sure that this works. But by experimenting around this solution you should be able to get it to work.
Let's say you want to work from PC1 and play sounds on both PC1 and PC2.
On both PC1 and PC2:
Install PulseAudio Preferences:
sudo apt-get install paprefsOn PC1 only:
- Open PulseAusio Preferences dialog (from Dash, say).
- In the
Network Accesstab enableMake discoverable PulseAudio network.... This will make the sound device in PC2 accessible from PC1, if allowed by PC2.
On PC2 only:
- Open PulseAusio Preferences dialog.
- In the
Network Servertab checkEnable network access to local sound devicesandAllow other machines on LAN to discover local sound devices. This makes the sound device in PC2 visible to PC1. - Do not check
Don't require authentication- that will allow others on the LAN to spam your sound system.
Providing authentication:
Copy ~/.pulse-cookie file from one of the PCs to the other, so that that file is identical in both PCs. It doesn't matter which PC's file is copied to the other.
At this point (possibly after rebooting the two PCs), you should be able to play sounds from PC1 on PC2's sound system:
On PC1
- Open the volume control dialog.
- In the
Outputtab change to PC2's sound device (Under the list "Play sound through"). - Play some sample audio in PC1 and verify that you can hear the output in PC2.
Now you want the sound server on PC1 to forward sounds to both sound devices (available locally to it). For this you have to create a virtual sound device whose slaves are the two available devices. An easy of doing this is
On PC1:
- Open PulseAudio Preferences dialog.
- In the
Simultaneous Outputtab, enableAdd virtual.... - From the volume control dialog, choose this virtual output device.
Notes:
- Simultaneous output on all local sound cards may not be desirable, in which case you should take a look at
pacmd'smodule-combineoption to combine only select sinks. - If you wish to work from either PC1 or PC2 and want all sounds to play on both PCs, perform PC1 and PC2 specific steps on both PC1 and PC2.
- Hopefully the network is strong enough that no noticeable sync errors will creep in. If not, apparently one will have to modify some buffer sizes to set things right.
Sources:
3Since the two systems are in the same room, and assuming playing the same audio track.Is it possible for you to just run long cables from one computer? So you can take one computer and attach a 3.5 jack splitter (if there is only one) attach one set of speakers to one of the outputs and the other set of speakers to the second output (you should be able to find 3.5jack extension cables if the one provided is not long enough). Or is the key to this set up to be strictly wireless?
1