diff options
Diffstat (limited to 'libs/ardour/session_process.cc')
-rw-r--r-- | libs/ardour/session_process.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc index 13f2a428ad..37a93468bf 100644 --- a/libs/ardour/session_process.cc +++ b/libs/ardour/session_process.cc @@ -1325,7 +1325,15 @@ Session::plan_master_strategy (pframes_t nframes, double master_speed, samplepos samplepos_t locate_target = master_transport_sample; - locate_target += wlp + lrintf (ntracks() * sample_rate() * 0.05); + /* locate to a position "worst_latency_preroll" head of + * the master, but also add in a generous estimate to + * cover the time it will take to locate to that + * position, based on our worst-case estimate for this + * session (so far). + */ + + cerr << "chase/locate using " << current_usecs_per_track << " usecs/track\n"; + locate_target += wlp + lrintf (ntracks() * sample_rate() * (1.5 * (current_usecs_per_track / 1000000.0))); DEBUG_TRACE (DEBUG::Slave, string_compose ("After locate-to-catch-master, still too far off (%1). Locate again to %2\n", delta, locate_target)); |