- // Plugin has flexible I/O, so delegate to it
- if (_plugins.front()->reconfigurable_io()) {
- return _plugins.front()->can_support_io_configuration (in, out);
+ return private_can_support_io_configuration (in, out).method != Impossible;
+}
+
+/** A private version of can_support_io_configuration which returns the method
+ * by which the configuration can be matched, rather than just whether or not
+ * it can be.
+ */
+PluginInsert::Match
+PluginInsert::private_can_support_io_configuration (ChanCount const & in, ChanCount& out) const
+{
+ PluginInfoPtr info = _plugins.front()->get_info();
+
+ if (info->reconfigurable_io()) {
+ /* Plugin has flexible I/O, so delegate to it */
+ bool const r = _plugins.front()->can_support_io_configuration (in, out);
+ if (!r) {
+ return Match (Impossible, 0);
+ }
+
+ return Match (Delegate, 1);
+ }
+
+ ChanCount inputs = info->n_inputs;
+ ChanCount outputs = info->n_outputs;
+
+ bool no_inputs = true;
+ for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {
+ if (inputs.get (*t) != 0) {
+ no_inputs = false;
+ break;
+ }