summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-10-26 15:14:16 +0000
committerCarl Hetherington <carl@carlh.net>2011-10-26 15:14:16 +0000
commitebca0ae87d381638ddb36224143ec2be3d701ef9 (patch)
treec58928911edcdf0d013d2608ad50648453405a6e /libs/ardour
parent77279f390d9e8c85ff336d8f7422cac3ecc81164 (diff)
Wait for the butler to be quiescent before starting
export of each range, rather than just the first one. Prevents clashes with both the butler and the export code doing track refills at the same time (may fix #4283). git-svn-id: svn://localhost/ardour2/branches/3.0@10307 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/session_export.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/libs/ardour/session_export.cc b/libs/ardour/session_export.cc
index dffe6582f2..7737e95279 100644
--- a/libs/ardour/session_export.cc
+++ b/libs/ardour/session_export.cc
@@ -62,8 +62,6 @@ Session::pre_export ()
{
get_export_status (); // Init export_status
- _butler->wait_until_finished ();
-
/* take everyone out of awrite to avoid disasters */
{
@@ -95,6 +93,7 @@ Session::pre_export ()
return 0;
}
+/** Called for each range that is being exported */
int
Session::start_audio_export (framepos_t position, bool /* realtime */)
{
@@ -102,6 +101,13 @@ Session::start_audio_export (framepos_t position, bool /* realtime */)
pre_export ();
}
+ /* We're about to call Track::seek, so the butler must have finished everything
+ up otherwise it could be doing do_refill in its thread while we are doing
+ it here.
+ */
+
+ _butler->wait_until_finished ();
+
/* get everyone to the right position */
{