"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:

>> 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).

I do not understand this. You seem to be measuring the offsets, not the
frequencies. The offset is irrelevant. What you want to do is to measure
the offset twice, and ask if the difference is constant or not. Ie, th
eoffset does not correspond to being off by 5Hz. 


>The problem is that this change won't be reflected immediately. Even

Sure it is. 

>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

But you do not care about the offset. You just want the frequencies to be
equal. 


>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.

So, take in account 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.

ntp is designed to get rid of both the offset and the frequency
differences. You just want to get rid of freq differences.

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

Reply via email to