From c30b47f0eb72b0f4c6807ef34eea7b557bd9be16 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 27 Apr 2016 23:32:00 +0200 Subject: allow to customize variable i/o plugin inputs --- libs/ardour/route.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'libs/ardour/route.cc') diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index f5785c174a..5bbb9d3562 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -2566,11 +2566,11 @@ bool Route::reset_plugin_insert (boost::shared_ptr proc) { ChanCount unused; - return customize_plugin_insert (proc, 0, unused); + return customize_plugin_insert (proc, 0, unused, unused); } bool -Route::customize_plugin_insert (boost::shared_ptr proc, uint32_t count, ChanCount outs) +Route::customize_plugin_insert (boost::shared_ptr proc, uint32_t count, ChanCount outs, ChanCount sinks) { boost::shared_ptr pi; if ((pi = boost::dynamic_pointer_cast(proc)) == 0) { @@ -2589,9 +2589,10 @@ Route::customize_plugin_insert (boost::shared_ptr proc, uint32_t coun Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock ()); Glib::Threads::RWLock::WriterLock lm (_processor_lock); - bool old_cust = pi->custom_cfg (); - uint32_t old_cnt = pi->get_count (); - ChanCount old_chan = pi->output_streams (); + bool old_cust = pi->custom_cfg (); + uint32_t old_cnt = pi->get_count (); + ChanCount old_chan = pi->output_streams (); + ChanCount old_sinks = pi->natural_input_streams (); if (count == 0) { pi->set_custom_cfg (false); @@ -2599,6 +2600,7 @@ Route::customize_plugin_insert (boost::shared_ptr proc, uint32_t coun pi->set_custom_cfg (true); pi->set_count (count); pi->set_outputs (outs); + pi->set_sinks (sinks); } list > c = try_configure_processors_unlocked (n_inputs (), 0); @@ -2606,6 +2608,7 @@ Route::customize_plugin_insert (boost::shared_ptr proc, uint32_t coun /* not possible */ pi->set_count (old_cnt); + pi->set_sinks (old_sinks); pi->set_outputs (old_chan); pi->set_custom_cfg (old_cust); -- cgit v1.2.3