From 7239cb09d909b7525c3f901d947484c0768a7ef9 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 13 Apr 2016 12:28:57 +0200 Subject: [PATCH] extend strict-i/o to include route outputs. --- libs/ardour/route.cc | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 5132c275ac..0441928c0a 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -2081,6 +2081,31 @@ Route::try_configure_processors_unlocked (ChanCount in, ProcessorStreams* err) for (ProcessorList::iterator p = _processors.begin(); p != _processors.end(); ++p, ++index) { if ((*p)->can_support_io_configuration(in, out)) { + + if (boost::dynamic_pointer_cast (*p) + && boost::dynamic_pointer_cast (*p)->role() == Delivery::Main + && _strict_io) { + /* with strict I/O the panner + output are forced to + * follow the last processor's output. + * + * Delivery::can_support_io_configuration() will only add ports, + * but not remove excess ports. + * + * This works because the delivery only requires + * as many outputs as there are inputs. + * Delivery::configure_io() will do the actual removal + * by calling _output->ensure_io() + */ + if (_session.master_out ()) { + /* ..but at least as many as there are master-inputs */ + // XXX this may need special-casing for mixbus (master-outputs) + // and should maybe be a preference anyway ?! + out = ChanCount::max (in, _session.master_out ()->n_inputs ()); + } else { + out = in; + } + } + DEBUG_TRACE (DEBUG::Processors, string_compose ("\t%1 ID=%2 in=%3 out=%4\n",(*p)->name(), (*p)->id(), in, out)); configuration.push_back(make_pair(in, out));