Hide, ///< we `hide' some of the plugin's inputs by feeding them silence
};
+ /** Description of how we can match our plugin's IO to our own insert IO */
+ struct Match {
+ Match () : method (Impossible), plugins (0), strict_io (false), custom_cfg (false) {}
+ Match (MatchingMethod m, int32_t p,
+ bool strict = false, bool custom = false, ChanCount h = ChanCount ())
+ : method (m), plugins (p), hide (h), strict_io (strict), custom_cfg (custom) {}
+
+ MatchingMethod method; ///< method to employ
+ int32_t plugins; ///< number of copies of the plugin that we need
+ ChanCount hide; ///< number of channels to hide
+ bool strict_io; ///< force in == out
+ bool custom_cfg; ///< custom config (if not strict)
+ };
+
private:
/* disallow copy construction */
PluginInsert (const PluginInsert&);
bool _custom_cfg;
bool _pending_no_inplace;
- /** Description of how we can match our plugin's IO to our own insert IO */
- struct Match {
- Match () : method (Impossible), plugins (0), strict_io (false), custom_cfg (false) {}
- Match (MatchingMethod m, int32_t p,
- bool strict = false, bool custom = false, ChanCount h = ChanCount ())
- : method (m), plugins (p), hide (h), strict_io (strict), custom_cfg (custom) {}
-
- MatchingMethod method; ///< method to employ
- int32_t plugins; ///< number of copies of the plugin that we need
- ChanCount hide; ///< number of channels to hide
- bool strict_io; ///< force in == out
- bool custom_cfg; ///< custom config (if not strict)
- };
-
Match private_can_support_io_configuration (ChanCount const &, ChanCount &) const;
Match automatic_can_support_io_configuration (ChanCount const &, ChanCount &) const;
} // namespace ARDOUR
+std::ostream& operator<<(std::ostream& o, const ARDOUR::PluginInsert::Match& m);
+
#endif /* __ardour_plugin_insert_h__ */
/* get plugin configuration */
_match = private_can_support_io_configuration (in, out);
+#ifndef NDEBUG // XXX
+ cout << "Match '" << name() << "': " << _match;
+#endif
/* set the matching method and number of plugins that we will use to meet this configuration */
if (set_count (_match.plugins) == false) {
if (mapping_changed) {
PluginMapChanged (); /* EMIT SIGNAL */
-#ifndef NDEBUG
+#ifndef NDEBUG // XXX
uint32_t pc = 0;
cout << "----<<----\n";
for (Plugins::iterator i = _plugins.begin(); i != _plugins.end(); ++i, ++pc) {
ac->stop_touch (true, session().audible_frame());
}
}
+
+std::ostream& operator<<(std::ostream& o, const ARDOUR::PluginInsert::Match& m)
+{
+ switch (m.method) {
+ case PluginInsert::Impossible: o << "Impossible"; break;
+ case PluginInsert::Delegate: o << "Delegate"; break;
+ case PluginInsert::NoInputs: o << "NoInputs"; break;
+ case PluginInsert::ExactMatch: o << "ExactMatch"; break;
+ case PluginInsert::Replicate: o << "Replicate"; break;
+ case PluginInsert::Split: o << "Split"; break;
+ case PluginInsert::Hide: o << "Hide"; break;
+ }
+ o << " cnt: " << m.plugins
+ << (m.strict_io ? " strict-io" : "")
+ << (m.custom_cfg ? " custom-cfg" : "");
+ if (m.method == PluginInsert::Hide) {
+ o << " hide: " << m.hide;
+ }
+ o << "\n";
+ return o;
+}