summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-04-01 01:41:10 +0200
committerRobin Gareus <robin@gareus.org>2016-04-01 01:41:10 +0200
commit66e488e38d70535a6187e2e40454143106cc9f28 (patch)
treeab11c9d72db5c8952530575cb8b6af366233c6b6 /libs/ardour
parent62a12f2e69e1f6b1d0b5fdf1575c5d6dda6bcc84 (diff)
custom config trumps strict-i/o
This allows a user to override strict-i/o per processor. The downside (currently): all downstream effects will be clamped to the customized outputs (not the actual track's inputs) This also introduces an new issue with re-config on session-load (missing code to handle this).
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/ardour/plugin_insert.h5
-rw-r--r--libs/ardour/plugin_insert.cc26
-rw-r--r--libs/ardour/route.cc5
3 files changed, 29 insertions, 7 deletions
diff --git a/libs/ardour/ardour/plugin_insert.h b/libs/ardour/ardour/plugin_insert.h
index 291dda4231..3e233ba6c1 100644
--- a/libs/ardour/ardour/plugin_insert.h
+++ b/libs/ardour/ardour/plugin_insert.h
@@ -111,8 +111,8 @@ class LIBARDOUR_API PluginInsert : public Processor
// route is not a friend class, it owns us
bool set_count (uint32_t num);
void set_outputs (const ChanCount&);
- void set_strict_io (bool b) { _strict_io = b; }
- void set_custom_cfg (bool b) { _custom_cfg = b; }
+ void set_strict_io (bool b);
+ void set_custom_cfg (bool b);
// end C++ class slavery!
uint32_t get_count () const { return _plugins.size(); }
@@ -209,6 +209,7 @@ class LIBARDOUR_API PluginInsert : public Processor
PBD::Signal2<void,BufferSet*, BufferSet*> AnalysisDataGathered;
PBD::Signal0<void> PluginIoReConfigure;
PBD::Signal0<void> PluginMapChanged;
+ PBD::Signal0<void> PluginConfigChanged;
/** Enumeration of the ways in which we can match our insert's
* IO to that of the plugin(s).
diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc
index 9e55979a24..78f46275f7 100644
--- a/libs/ardour/plugin_insert.cc
+++ b/libs/ardour/plugin_insert.cc
@@ -86,6 +86,16 @@ PluginInsert::~PluginInsert ()
{
}
+void
+PluginInsert::set_strict_io (bool b)
+{
+ bool changed = _strict_io != b;
+ _strict_io = b;
+ if (changed) {
+ PluginConfigChanged (); /* EMIT SIGNAL */
+ }
+}
+
bool
PluginInsert::set_count (uint32_t num)
{
@@ -111,12 +121,14 @@ PluginInsert::set_count (uint32_t num)
/* XXX do something */
}
}
+ PluginConfigChanged (); /* EMIT SIGNAL */
} else if (num < _plugins.size()) {
uint32_t diff = _plugins.size() - num;
for (uint32_t n= 0; n < diff; ++n) {
_plugins.pop_back();
}
+ PluginConfigChanged (); /* EMIT SIGNAL */
}
return true;
@@ -126,7 +138,21 @@ PluginInsert::set_count (uint32_t num)
void
PluginInsert::set_outputs (const ChanCount& c)
{
+ bool changed = (_custom_out != c) && _custom_cfg;
_custom_out = c;
+ if (changed) {
+ PluginConfigChanged (); /* EMIT SIGNAL */
+ }
+}
+
+void
+PluginInsert::set_custom_cfg (bool b)
+{
+ bool changed = _custom_cfg != b;
+ _custom_cfg = b;
+ if (changed) {
+ PluginConfigChanged (); /* EMIT SIGNAL */
+ }
}
void
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 990ab14e28..6519980b68 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -2413,10 +2413,6 @@ Route::reset_plugin_insert (boost::shared_ptr<Processor> proc)
bool
Route::customize_plugin_insert (boost::shared_ptr<Processor> proc, uint32_t count, ChanCount outs)
{
- if (_strict_io) {
- return false;
- }
-
boost::shared_ptr<PluginInsert> pi;
if ((pi = boost::dynamic_pointer_cast<PluginInsert>(proc)) == 0) {
return false;
@@ -2441,7 +2437,6 @@ Route::customize_plugin_insert (boost::shared_ptr<Processor> proc, uint32_t coun
Glib::Threads::RWLock::WriterLock lm (_processor_lock);
ProcessorState pstate (this);
- assert (!pi->strict_io ());
bool old_cust = pi->custom_cfg ();
uint32_t old_cnt = pi->get_count ();
ChanCount old_chan = pi->output_streams ();