3 ms·
Have each speaker transmit a little packet with a timestamp 10 times per second to each other. Or relative to some designated central point. Each speaker will
by fallingfrog 5y ago
Have each speaker transmit a little packet with a timestamp 10 times per second to each other. Or relative to some designated central point. Each speaker will have an internal clock but use the central clock tick to keep exactly synchronized.
Having synchronized their timestamps, the central hub transmits a specific time for playback to begin. At this point you need to make sure that there isn't any unexpected buffering going on, output buffers have to be tiny/realtime or the process of sending signal out has to be again synced to the clock, which means you need control over the firmware/drivers. Worst case you might have to skip or repeat a couple samples once in a while to keep synced up which in a 44000 samples per second signal is not a big deal.
You need a big enough input buffer to play a few seconds of audio, just to be safe, but the output buffer has to be realtime.
That's pretty much how I'd do it, off the top of my head.