Fix initial sync to LTC with small buffersizes
authorRobin Gareus <robin@gareus.org>
Wed, 26 Jul 2017 20:54:31 +0000 (22:54 +0200)
committerRobin Gareus <robin@gareus.org>
Wed, 26 Jul 2017 20:58:16 +0000 (22:58 +0200)
commit28c29ab22dfb13ca185175ed94ba2d27c72489cf
treed2d7671b6b248b9058621b251894fd65ded5d5d9
parentb804109e8ec24e6c2201e4e317ca91ed01ba5245
Fix initial sync to LTC with small buffersizes

Ardour follow_slave() does nothing (not even seek) if the slave is not
locked.

The LTC-slave assumes it's locked if LTC is stable for 5 continuous
process-calls.

If the difference of Ardour's transport-position to the LTC-timecode
is large (> 2sec), the slave reset itself (assuming drift, seek don't vari-
speed).

A LTC-slave does reset does reset the locked counter.

Hence: If initially Ardour's transport differs > 2 sec and the buffersize
is small (many process-callbacks), the slave kept resetting itself
never informing Ardour that it locked to the external TC, and Ardour
never issued a seek.
libs/ardour/ardour/slave.h
libs/ardour/ltc_slave.cc