how can i get two computers on a network to play a sound at the same time?
2008-05-19 11:19:30 UTC
Is there anyway i can get two computers (connected by a network) to play the same sound at the same time. for instance, if i played a sound on one computer, it would come out on both sets of sound systems.
Three answers:
IMMI
2008-05-19 11:24:43 UTC
I Dont Think so.
anotherbsdparent
2008-05-19 11:44:58 UTC
your best bet is to synchronize the clocks on both machines very accurately, then write custom code to start the sound when some time is reached.
Running a command line program at the play time is going to introduce too much uncertainty in the start time, since the program and then the audio will need to be loaded.
Have the program preload the audio into memory then wait for the trigger, so disk accesses are not required at the time the audio is to be played.
A GPS is a good common time source.
Using NTP directly between the two machines can work.
Or use IEEE-1588 for better time alignment.
Marvinator
2008-05-19 11:29:23 UTC
If both computers were accessing the same server, the server could, in theory, make both computers play a sound at approximately the same time, either through synchronous access by the two computers or through a broadcast sent to both computers from the server.
ⓘ
This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.