summaryrefslogtreecommitdiff
path: root/libs/ardour/session_ltc.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2012-10-29 17:29:34 +0000
committerRobin Gareus <robin@gareus.org>2012-10-29 17:29:34 +0000
commit52532839110d4bbd2e4dc3e0eb8967d0f278a611 (patch)
treeb2e71ba9e3e3a795e8df73cb3fe5d323a7d2809c /libs/ardour/session_ltc.cc
parentb0fb2a032b09ce17d9ebc44fca71d301a47b04af (diff)
LTC: break out xrun and latency callbacks.
prepare to call get_connected_latency_range() only if needed. git-svn-id: svn://localhost/ardour2/branches/3.0@13366 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_ltc.cc')
-rw-r--r--libs/ardour/session_ltc.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/libs/ardour/session_ltc.cc b/libs/ardour/session_ltc.cc
index b7044d28a4..d14756c0ba 100644
--- a/libs/ardour/session_ltc.cc
+++ b/libs/ardour/session_ltc.cc
@@ -58,7 +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_resync_latency, this));
+ ltc_tx_resync_latency();
+ Xrun.connect_same_thread (*this, boost::bind (&Session::ltc_tx_reset, this));
engine().GraphReordered.connect_same_thread (*this, boost::bind (&Session::ltc_tx_resync_latency, this));
}
@@ -92,7 +93,6 @@ Session::ltc_tx_reset()
ltc_buf_off = 0;
ltc_enc_byte = 0;
ltc_enc_cnt = 0;
- ltc_tx_resync_latency();
}
void
@@ -160,6 +160,9 @@ Session::ltc_tx_send_time_code_for_cycle (framepos_t start_frame, framepos_t end
* ..but first fix jack2 issue with re-computing latency
* in the correct order. Until then, querying it in the
* process-callback is the only way to get the current value
+ *
+ * update: fix for this issue is known -- common/JackEngine.cpp
+ * but not yet applied to jack2 git.
*/
ltcport->get_connected_latency_range(ltc_out_latency, true);
#endif