From 05a13e151ef4792989c17e4b10d649d35a4c08e0 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 17 Mar 2023 05:48:32 +0100 Subject: [PATCH] PI: Leave unconnected buffers when split processing Otherwise a stereo plugin on a mono bus will still have two valid input buffers, and a map saying so during process(). --- libs/ardour/plugin_insert.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc index deb1a0502b..53455f04b7 100644 --- a/libs/ardour/plugin_insert.cc +++ b/libs/ardour/plugin_insert.cc @@ -897,10 +897,10 @@ PluginInsert::connect_and_run (BufferSet& bufs, samplepos_t start, samplepos_t e } if (_match.method == Split && !no_inplace) { - // TODO: also use this optimization if one source-buffer - // feeds _all_ *connected* inputs. - // currently this is *first* buffer to all only -- - // see PluginInsert::check_inplace + /* This allows in-place processing. Copying a single source-port + * to all the input pins of a plugin, using a dedicated buffer for each. + * see PluginInsert::check_inplace + */ for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) { if (_configured_internal.get (*t) == 0) { continue; @@ -917,8 +917,6 @@ PluginInsert::connect_and_run (BufferSet& bufs, samplepos_t start, samplepos_t e } } } - /* the copy operation produces a linear monotonic input map */ - in_map[0] = ChanMapping (natural_input_streams ()); } bufs.set_count(ChanCount::max(bufs.count(), _configured_internal));