remove conditional surrounding wait-for-master-to-catch-us logic
This commit is contained in:
parent
64b6ea4341
commit
033699a4cd
|
@ -1129,28 +1129,13 @@ Session::track_transport_master (float slave_speed, samplepos_t slave_transport_
|
|||
|
||||
switch (transport_master_tracking_state) {
|
||||
case Stopped:
|
||||
if (master->requires_seekahead()) {
|
||||
master_wait_end = slave_transport_sample + master->seekahead_distance ();
|
||||
DEBUG_TRACE (DEBUG::Slave, string_compose ("slave stopped, but running, requires seekahead to %1\n", master_wait_end));
|
||||
/* we can call locate() here because we are in process context */
|
||||
if (micro_locate (master_wait_end - _transport_sample) != 0) {
|
||||
locate (master_wait_end, false, false);
|
||||
}
|
||||
transport_master_tracking_state = Waiting;
|
||||
|
||||
} else {
|
||||
|
||||
DEBUG_TRACE (DEBUG::Slave, string_compose ("slave stopped -> running at %1\n", slave_transport_sample));
|
||||
|
||||
if (slave_transport_sample != _transport_sample) {
|
||||
DEBUG_TRACE (DEBUG::Slave, string_compose ("require locate to run. eng: %1 -> sl: %2\n", _transport_sample, slave_transport_sample));
|
||||
if (micro_locate (slave_transport_sample - _transport_sample) != 0) {
|
||||
locate (slave_transport_sample, false, false);
|
||||
}
|
||||
}
|
||||
transport_master_tracking_state = Running;
|
||||
master_wait_end = slave_transport_sample + worst_latency_preroll() + master->seekahead_distance ();
|
||||
DEBUG_TRACE (DEBUG::Slave, string_compose ("slave stopped, but running, requires seekahead to %1, now WAITING\n", master_wait_end));
|
||||
/* we can call locate() here because we are in process context */
|
||||
if (micro_locate (master_wait_end - _transport_sample) != 0) {
|
||||
locate (master_wait_end, false, false);
|
||||
}
|
||||
break;
|
||||
transport_master_tracking_state = Waiting;
|
||||
|
||||
case Waiting:
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue
Block a user