summaryrefslogtreecommitdiff
path: root/libs/ardour/session_ltc.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2012-10-28 10:48:06 +0000
committerRobin Gareus <robin@gareus.org>2012-10-28 10:48:06 +0000
commit52423fa8c3a460c5057b560121a84758f108a17c (patch)
tree4ad5fbf5b3764c57ca872314ac268c8189ca2b7c /libs/ardour/session_ltc.cc
parentf750aa32070b128f5e61e5abc39855f8654fb0de (diff)
LTC (slave&gen): no reset on graph-change
fixes issues with transport stop/start when making connections with jack1 while slaved to LTC git-svn-id: svn://localhost/ardour2/branches/3.0@13356 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_ltc.cc')
-rw-r--r--libs/ardour/session_ltc.cc24
1 files changed, 15 insertions, 9 deletions
diff --git a/libs/ardour/session_ltc.cc b/libs/ardour/session_ltc.cc
index dd2ddb5692..b7044d28a4 100644
--- a/libs/ardour/session_ltc.cc
+++ b/libs/ardour/session_ltc.cc
@@ -58,8 +58,8 @@ Session::ltc_tx_initialize()
ltc_enc_buf = (ltcsnd_sample_t*) calloc((nominal_frame_rate() / 23), sizeof(ltcsnd_sample_t));
ltc_speed = 0;
ltc_tx_reset();
- Xrun.connect_same_thread (*this, boost::bind (&Session::ltc_tx_reset, this));
- engine().GraphReordered.connect_same_thread (*this, boost::bind (&Session::ltc_tx_reset, this));
+ Xrun.connect_same_thread (*this, boost::bind (&Session::ltc_tx_resync_latency, this));
+ engine().GraphReordered.connect_same_thread (*this, boost::bind (&Session::ltc_tx_resync_latency, this));
}
void
@@ -72,6 +72,18 @@ Session::ltc_tx_cleanup()
}
void
+Session::ltc_tx_resync_latency()
+{
+ DEBUG_TRACE (DEBUG::LTC, "LTC TX resync latency\n");
+ if (!deletion_in_progress()) {
+ boost::shared_ptr<Port> ltcport = ltc_output_port();
+ if (ltcport) {
+ ltcport->get_connected_latency_range(ltc_out_latency, true);
+ }
+ }
+}
+
+void
Session::ltc_tx_reset()
{
DEBUG_TRACE (DEBUG::LTC, "LTC TX reset\n");
@@ -80,13 +92,7 @@ Session::ltc_tx_reset()
ltc_buf_off = 0;
ltc_enc_byte = 0;
ltc_enc_cnt = 0;
-
- if (!deletion_in_progress()) {
- boost::shared_ptr<Port> ltcport = ltc_output_port();
- if (ltcport) {
- ltcport->get_connected_latency_range(ltc_out_latency, true);
- }
- }
+ ltc_tx_resync_latency();
}
void