summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-01-24 16:45:13 +0000
committerCarl Hetherington <carl@carlh.net>2009-01-24 16:45:13 +0000
commita9d67a2cc97b28795a9112a176ba1f2c1ab470d3 (patch)
tree57b271f459a27be04acbf6ac4e7fe1cdaeaed0db /libs
parentdbf05a6b0fc96580635615037952f894c7b2fd11 (diff)
Do not take into account sends when computing the required number of buffers, as they're presence should not affect anything.
git-svn-id: svn://localhost/ardour2/branches/3.0@4442 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/route.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 61eb0a5b82..fab3c085db 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -458,8 +458,12 @@ Route::process_output_buffers (BufferSet& bufs,
}
}
- // This really should already be true...
- bufs.set_count(pre_fader_streams());
+ /* When we entered this method, the number of bufs was set by n_process_buffers(), so
+ * it may be larger than required. Consider, for example, a mono track with two redirects A and B.
+ * If A has one input and three outputs, and B three inputs and one output, n_process_buffers()
+ * will be 3. In this case, now we've done pre-fader redirects, we can reset the number of bufs.
+ */
+ bufs.set_count (pre_fader_streams());
if (!_soloed && (mute_gain != dmg) && !mute_declick_applied && _mute_affects_post_fader) {
Amp::run_in_place (bufs, nframes, mute_gain, dmg, false);
@@ -1398,9 +1402,10 @@ Route::pre_fader_streams() const
{
boost::shared_ptr<Processor> processor;
- // Find the last pre-fader redirect
+ /* Find the last pre-fader redirect that isn't a send; sends don't affect the number
+ * of streams. */
for (ProcessorList::const_iterator i = _processors.begin(); i != _processors.end(); ++i) {
- if ((*i)->placement() == PreFader) {
+ if ((*i)->placement() == PreFader && boost::dynamic_pointer_cast<Send> (*i) == 0) {
processor = *i;
}
}