[livecode] Network Sync Clock Tests

From: Andrew Sorensen <andrew_at_moso.com.au>
Date: Thu, 17 Dec 2009 14:28:43 +1000

OK, so hopefully all of this is going to make some sense :)

I've been building some more advanced sync/clock related stuff into
Impromptu recently and am getting some pretty good results. My
question to the list is that I'm looking for ideas about the most
accurate way to test the sync without resorting to specialist hardware
(GPS clocks, network cards with timestamping etc.).

At the moment my testing approach is to schedule regular pulses from
up to 8 host machines running Impromptu and record one output channel
of each into another machine with an 828. I can then measure the
difference between the pulse times in samples between the (up to 8)
recorded audio channels. This seems a pretty accurate test and I'm
getting a reliable sync and my early experiments indicate an offset
range between 1 and 5 samples (< 100 microseconds at 44.1k).

The sync results (i.e. the measured clock times of the hosts involved)
as reported by the "impromptu time server" confirms my audio results
but paranoia of the unknown remains strong :)

My paranoia is that there are going to be buffering issues with the
hardware/device drivers as well as delay on the wire etc.. I don't
have much experience with these issues. How much variation should I
expect between each hosts audio data leaving its DAC and being
successfully processed (i.e. both ADC and Device Driver latency) via
the 828. How much should I be worried about the latency of the audio
signal from the time it's sent from each host to the time it's
received. It's not the overall but the relative delays I'm primarily
concerned about. Are we talking nanoseconds or microseconds of
difference between each sending host here?

My assumption with all of this is that I'm going to get better
accuracy (with less precision) from an audio signal than sending time-
stamped UDP over a gigabit LAN?

If anyone has any thoughts on the accuracy of my tests and what I
might do differently to improve upon them (without resorting to
specialist hardware) I'd love to hear them. I'm running OSX but
thoughts relating to any OS/audio hardware welcome.

Cheers,
Andrew.
Received on Thu Dec 17 2009 - 04:29:19 GMT

This archive was generated by hypermail 2.4.0 : Sun Aug 20 2023 - 16:02:23 BST