13
0

LTC: sync-lock is only relevant when clock is synced

This commit is contained in:
Robin Gareus 2020-05-10 22:03:04 +02:00
parent bff9c9a5a1
commit e9401934c1
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 10 additions and 1 deletions

View File

@ -595,6 +595,7 @@ public:
return 0;
}
void init ();
void set_sample_clock_synced (bool);
Timecode::TimecodeFormat apparent_timecode_format () const;
std::string position_string () const;

View File

@ -195,6 +195,13 @@ LTC_TransportMaster::resync_xrun()
sync_lock_broken = false;
}
void
LTC_TransportMaster::set_sample_clock_synced (bool yn)
{
sync_lock_broken = false;
TransportMaster::set_sample_clock_synced (yn);
}
void
LTC_TransportMaster::resync_latency (bool playback)
{
@ -224,6 +231,7 @@ LTC_TransportMaster::reset (bool with_position)
}
transport_direction = 0;
sync_lock_broken = false;
delayedlocked = 10;
monotonic_cnt = 0;
memset (&prev_frame, 0, sizeof(LTCFrameExt));
frames_since_reset = 0;
@ -702,7 +710,7 @@ LTC_TransportMaster::delta_string() const
LEADINGZERO(abs(secs)), PLUSMINUS(-secs), abs(secs));
} else {
snprintf (delta, sizeof(delta), "<span foreground=\"%s\" face=\"monospace\" >%s%s%lld</span><span face=\"monospace\">sm</span>",
sync_lock_broken ? "red" : "white",
_sclock_synced && sync_lock_broken ? "red" : "white",
LEADINGZERO(::llabs(_current_delta)), PLUSMINUS(-_current_delta), ::llabs(_current_delta));
}
}