> Again, I am afraid this is making no sense. How do you compare your
> frequencies? What do you do when you have made the comparison? What do you
> change to change teh frequency.

When I do an NTP exchange of timestamps, I take the resulting
timestamp offset and convert it to the timescale of my audio clock
(i.e. if at audio time X, NTP time is Y then at NTP time A, I can
calculate audio time is B). I compare my audio time with the peer's
audio time to come up with an audio clock offset. So if via NTP
exchanges, I calculate an audio clock offset of 5 units, that maps to
the frequency being off by 5 Hz. So if my clock is set to 44100 Hz and
it's off by +5, I change my clock to 44105 Hz. I change the frequency
by setting a hardware register to the value 44105 (in this case).

The problem is that this change won't be reflected immediately. Even
if I 44105 Hz is exactly in sync with the peer, when I do another NTP
exchange in 2 seconds, it won't have enough time to compensate for the
existing offset so I may still calculate an offset of say 4 Hz then 3
Hz in another 2 seconds, etc. By the time I get to 0, I may have set
my frequency to 44115 Hz and now it's too fast so it'll start getting
negative offsets. And it cycles back and forth like that because I'm
not taking into consideration the relative change.

Figuring out a good way to incorporate the relative change to
discipline the clocks is what I'm hoping the NTP algorithms can do.

_______________________________________________
questions mailing list
[email protected]
https://lists.ntp.org/mailman/listinfo/questions

Reply via email to