decoder = ltc_decoder_create((int) frames_per_ltc_frame, 128 /*queue size*/);
reset();
- session.Xrun.connect_same_thread (port_connections, boost::bind (<C_Slave::resync_latency, this));
+ resync_latency();
+ session.Xrun.connect_same_thread (port_connections, boost::bind (<C_Slave::resync_xrun, this));
session.engine().GraphReordered.connect_same_thread (port_connections, boost::bind (<C_Slave::resync_latency, this));
}
return true;
}
+void
+LTC_Slave::resync_xrun()
+{
+ DEBUG_TRACE (DEBUG::LTC, "LTC resync_xrun()\n");
+ engine_dll_initstate = 0;
+}
+
void
LTC_Slave::resync_latency()
{
- DEBUG_TRACE (DEBUG::LTC, "LTC resync()\n");
+ DEBUG_TRACE (DEBUG::LTC, "LTC resync_latency()\n");
engine_dll_initstate = 0;
if (session.ltc_output_io()) { /* check if Port exits */
transport_direction = 0;
ltc_speed = 0;
engine_dll_initstate = 0;
- resync_latency();
}
void
* ..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_slave_latency, false);
#endif
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));
}
ltc_buf_off = 0;
ltc_enc_byte = 0;
ltc_enc_cnt = 0;
- ltc_tx_resync_latency();
}
void
* ..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