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
This commit is contained in:
Paul Davis 2010-02-01 16:56:19 +00:00
parent 036aba430b
commit ba7fdff8a8

View file

@ -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<Sample*> 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;