summaryrefslogtreecommitdiff
path: root/libs/ardour/ltc_slave.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/ltc_slave.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/ltc_slave.cc')
-rw-r--r--libs/ardour/ltc_slave.cc22
1 files changed, 15 insertions, 7 deletions
diff --git a/libs/ardour/ltc_slave.cc b/libs/ardour/ltc_slave.cc
index 12386eeb18..4f6f77ce1f 100644
--- a/libs/ardour/ltc_slave.cc
+++ b/libs/ardour/ltc_slave.cc
@@ -61,8 +61,8 @@ LTC_Slave::LTC_Slave (Session& s)
decoder = ltc_decoder_create((int) frames_per_ltc_frame, 128 /*queue size*/);
reset();
- session.Xrun.connect_same_thread (port_connections, boost::bind (&LTC_Slave::reset, this));
- session.engine().GraphReordered.connect_same_thread (port_connections, boost::bind (&LTC_Slave::reset, this));
+ session.Xrun.connect_same_thread (port_connections, boost::bind (&LTC_Slave::resync_latency, this));
+ session.engine().GraphReordered.connect_same_thread (port_connections, boost::bind (&LTC_Slave::resync_latency, this));
}
LTC_Slave::~LTC_Slave()
@@ -95,6 +95,18 @@ LTC_Slave::ok() const
}
void
+LTC_Slave::resync_latency()
+{
+ DEBUG_TRACE (DEBUG::LTC, "LTC resync()\n");
+ engine_dll_initstate = 0;
+
+ if (session.ltc_output_io()) { /* check if Port exits */
+ boost::shared_ptr<Port> ltcport = session.ltc_input_port();
+ ltcport->get_connected_latency_range(ltc_slave_latency, false);
+ }
+}
+
+void
LTC_Slave::reset()
{
DEBUG_TRACE (DEBUG::LTC, "LTC reset()\n");
@@ -103,11 +115,7 @@ LTC_Slave::reset()
transport_direction = 0;
ltc_speed = 0;
engine_dll_initstate = 0;
-
- if (session.ltc_output_io()) { /* check if Port exits */
- boost::shared_ptr<Port> ltcport = session.ltc_input_port();
- ltcport->get_connected_latency_range(ltc_slave_latency, false);
- }
+ resync_latency();
}
void