ChanCount old_in = input_streams ();
ChanCount old_out = output_streams ();
+ _configured_in = in;
+ _configured_out = out;
+
/* set the matching method and number of plugins that we will use to meet this configuration */
_match = private_can_support_io_configuration (in, out);
if (set_count (_match.plugins) == false) {
- return false;
- }
-
- if ( (old_match.method != _match.method && (old_match.method == Split || _match.method == Split))
- || old_in != in
- || old_out != out
- )
- {
PluginIoReConfigure (); /* EMIT SIGNAL */
+ return false;
}
/* configure plugins */
switch (_match.method) {
case Split:
case Hide:
- if (_plugins.front()->configure_io (_plugins.front()->get_info()->n_inputs, out)) {
+ if (_plugins.front()->configure_io (_plugins.front()->get_info()->n_inputs, out) == false) {
+ PluginIoReConfigure (); /* EMIT SIGNAL */
return false;
}
break;
default:
if (_plugins.front()->configure_io (in, out) == false) {
+ PluginIoReConfigure (); /* EMIT SIGNAL */
return false;
}
break;
}
+ if ( (old_match.method != _match.method && (old_match.method == Split || _match.method == Split))
+ || old_in != in
+ || old_out != out
+ )
+ {
+ PluginIoReConfigure (); /* EMIT SIGNAL */
+ }
+
// we don't know the analysis window size, so we must work with the
// current buffer size here. each request for data fills in these
// buffers and the analyser makes sure it gets enough data for the
node.add_property("type", _plugins[0]->state_node_name());
node.add_property("unique-id", _plugins[0]->unique_id());
node.add_property("count", string_compose("%1", _plugins.size()));
+
+ /* remember actual i/o configuration (for later placeholder
+ * in case the plugin goes missing) */
+ node.add_child_nocopy (* _configured_in.state (X_("ConfiguredInput")));
+ node.add_child_nocopy (* _configured_out.state (X_("ConfiguredOutput")));
+
node.add_child_nocopy (_plugins[0]->get_state());
for (Controls::iterator c = controls().begin(); c != controls().end(); ++c) {
return 0;
}
+void
+PluginInsert::update_id (PBD::ID id)
+{
+ set_id (id.to_s());
+ for (Plugins::iterator i = _plugins.begin(); i != _plugins.end(); ++i) {
+ (*i)->set_insert_id (id);
+ }
+}
+
void
PluginInsert::set_parameter_state_2X (const XMLNode& node, int version)
{
boost::shared_ptr<Plugin> ret;
if (_impulseAnalysisPlugin.expired()) {
ret = plugin_factory(_plugins[0]);
+ ret->configure_io (input_streams (), output_streams ());
_impulseAnalysisPlugin = ret;
} else {
ret = _impulseAnalysisPlugin.lock();