From b8ce25fdab218673bd5e99f8899cf33f3c235ac4 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 8 Apr 2020 23:58:21 +0200 Subject: Fix export-alignment with JACK -- #7916 --- libs/ardour/session_export.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libs/ardour/session_export.cc b/libs/ardour/session_export.cc index 4f9670d5e2..385978aec7 100644 --- a/libs/ardour/session_export.cc +++ b/libs/ardour/session_export.cc @@ -277,6 +277,15 @@ Session::process_export_fw (pframes_t nframes) butler_transport_work (); g_atomic_int_set (&_butler->should_do_transport_work, 0); butler_completed_transport_work (); + /* Session::process_with_events () sets _remaining_latency_preroll = 0 + * when being called with _transport_speed == 0.0. + * + * This can happen wit JACK, there is a process-callback before + * freewheeling becomes active, after Session::start_audio_export(). + */ + if (!_region_export) { + _remaining_latency_preroll = worst_latency_preroll_buffer_size_ceil (); + } return; } -- cgit v1.2.3