summaryrefslogtreecommitdiff
path: root/libs/ardour/session.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-08-16 19:58:34 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-08-16 19:58:34 +0000
commita4d9d09af5853f769e1143c2353806bfb7d89f58 (patch)
tree05dc35268557395124f130ec8b6d8e32c6e49b7b /libs/ardour/session.cc
parent0b2f156c5850fb1c60aae25df4b9767bd7f92b89 (diff)
forward port 2.X changes up to and including rev 6714
git-svn-id: svn://localhost/ardour2/branches/3.0@7635 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r--libs/ardour/session.cc23
1 files changed, 17 insertions, 6 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 2989e14afa..ea4ae4c12c 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -3532,7 +3532,7 @@ Session::freeze_all (InterThreadInfo& itt)
}
boost::shared_ptr<Region>
-Session::write_one_track (AudioTrack& track, nframes_t start, nframes_t end,
+Session::write_one_track (AudioTrack& track, framepos_t start, framepos_t end,
bool /*overwrite*/, vector<boost::shared_ptr<Source> >& srcs,
InterThreadInfo& itt, bool enable_processing)
{
@@ -3542,13 +3542,14 @@ Session::write_one_track (AudioTrack& track, nframes_t start, nframes_t end,
uint32_t x;
char buf[PATH_MAX+1];
ChanCount nchans(track.n_channels());
- nframes_t position;
- nframes_t this_chunk;
- nframes_t to_do;
+ framepos_t position;
+ framecnt_t this_chunk;
+ framepos_t to_do;
BufferSet buffers;
SessionDirectory sdir(get_best_session_directory_for_new_source ());
const string sound_dir = sdir.sound_path().to_string();
- nframes_t len = end - start;
+ framepos_t len = end - start;
+ bool need_block_size_reset = false;
string ext;
if (end <= start) {
@@ -3557,7 +3558,7 @@ Session::write_one_track (AudioTrack& track, nframes_t start, nframes_t end,
return result;
}
- const nframes_t chunk_size = (256 * 1024)/4;
+ const framecnt_t chunk_size = (256 * 1024)/4;
// block all process callback handling
@@ -3604,6 +3605,11 @@ Session::write_one_track (AudioTrack& track, nframes_t start, nframes_t end,
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;
@@ -3694,6 +3700,11 @@ Session::write_one_track (AudioTrack& track, nframes_t start, nframes_t end,
}
}
+
+ if (need_block_size_reset) {
+ track.set_block_size (get_block_size());
+ }
+
unblock_processing ();
return result;