summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2020-05-10 22:03:04 +0200
committerRobin Gareus <robin@gareus.org>2020-05-10 22:28:37 +0200
commite9401934c186900e383f99654ce6c92b913a1292 (patch)
tree9f5daf31807b7cad115a311c025bae5dc106eee0 /libs
parentbff9c9a5a17671de5b7c230f01ba806af4d9e0a1 (diff)
LTC: sync-lock is only relevant when clock is synced
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/ardour/transport_master.h1
-rw-r--r--libs/ardour/ltc_slave.cc10
2 files changed, 10 insertions, 1 deletions
diff --git a/libs/ardour/ardour/transport_master.h b/libs/ardour/ardour/transport_master.h
index c7c0c65175..53e99fdcb3 100644
--- a/libs/ardour/ardour/transport_master.h
+++ b/libs/ardour/ardour/transport_master.h
@@ -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;
diff --git a/libs/ardour/ltc_slave.cc b/libs/ardour/ltc_slave.cc
index 1fa3c741c3..1e8ff2b24e 100644
--- a/libs/ardour/ltc_slave.cc
+++ b/libs/ardour/ltc_slave.cc
@@ -196,6 +196,13 @@ LTC_TransportMaster::resync_xrun()
}
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)
{
if (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));
}
}