summaryrefslogtreecommitdiff
path: root/libs/ardour/route.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-04-27 23:32:00 +0200
committerRobin Gareus <robin@gareus.org>2016-04-27 23:34:55 +0200
commitc30b47f0eb72b0f4c6807ef34eea7b557bd9be16 (patch)
treeccbce9fde44fb1071c057fc2ce8489bef2279a97 /libs/ardour/route.cc
parentb191408f986debf75fd7077946048259c071730e (diff)
allow to customize variable i/o plugin inputs
Diffstat (limited to 'libs/ardour/route.cc')
-rw-r--r--libs/ardour/route.cc13
1 files changed, 8 insertions, 5 deletions
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<Processor> 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<Processor> proc, uint32_t count, ChanCount outs)
+Route::customize_plugin_insert (boost::shared_ptr<Processor> proc, uint32_t count, ChanCount outs, ChanCount sinks)
{
boost::shared_ptr<PluginInsert> pi;
if ((pi = boost::dynamic_pointer_cast<PluginInsert>(proc)) == 0) {
@@ -2589,9 +2589,10 @@ Route::customize_plugin_insert (boost::shared_ptr<Processor> 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<Processor> proc, uint32_t coun
pi->set_custom_cfg (true);
pi->set_count (count);
pi->set_outputs (outs);
+ pi->set_sinks (sinks);
}
list<pair<ChanCount, ChanCount> > c = try_configure_processors_unlocked (n_inputs (), 0);
@@ -2606,6 +2608,7 @@ Route::customize_plugin_insert (boost::shared_ptr<Processor> 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);