From ba7fdff8a81c110fe9a1e9ea942dba1945243ac6 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 1 Feb 2010 16:56:19 +0000 Subject: [PATCH] call Route::set_block_size() before exporting stuff for a track, so that plugins that care about maximum buffer sizes (AU & VST) can do their stuff. obviously, call it again when done git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@6608 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/session.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index d511897b3b..c5036301a8 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -4164,6 +4164,7 @@ Session::write_one_audio_track (AudioTrack& track, nframes_t start, nframes_t en nframes_t this_chunk; nframes_t to_do; nframes_t len = end - start; + nframes_t need_block_size_reset = false; vector buffers; if (end <= start) { @@ -4221,6 +4222,11 @@ Session::write_one_audio_track (AudioTrack& track, nframes_t start, nframes_t en srcs.push_back (fsource); } + /* tell redirects that care that we are about to use a much larger blocksize */ + + need_block_size_reset = true; + track.set_block_size (chunk_size); + /* XXX need to flush all redirects */ position = start; @@ -4312,6 +4318,10 @@ Session::write_one_audio_track (AudioTrack& track, nframes_t start, nframes_t en free (*i); } + if (need_block_size_reset) { + track.set_block_size (get_block_size()); + } + unblock_processing (); itt.done = true;