summaryrefslogtreecommitdiff
path: root/libs/ardour/session_export.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2020-04-08 23:58:21 +0200
committerRobin Gareus <robin@gareus.org>2020-04-09 00:01:44 +0200
commitb8ce25fdab218673bd5e99f8899cf33f3c235ac4 (patch)
treeaf220310bf03fcbcba244422be6bffd5024e390d /libs/ardour/session_export.cc
parentf32245c15665023ee7aa3286a5f40ddc66f5015c (diff)
Fix export-alignment with JACK -- #7916
Diffstat (limited to 'libs/ardour/session_export.cc')
-rw-r--r--libs/ardour/session_export.cc9
1 files changed, 9 insertions, 0 deletions
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;
}