13
0

Trim function that is only used once.

git-svn-id: svn://localhost/ardour2/branches/3.0@10804 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2011-11-23 19:29:48 +00:00
parent 96f3d1fd5c
commit e8ee8593c7
2 changed files with 5 additions and 13 deletions

View File

@ -186,7 +186,6 @@ class PluginInsert : public Processor
void set_control_ids (const XMLNode&, int version);
boost::shared_ptr<Plugin> plugin_factory (boost::shared_ptr<Plugin>);
void add_plugin_with_activation (boost::shared_ptr<Plugin>);
void add_plugin (boost::shared_ptr<Plugin>);
};

View File

@ -94,7 +94,11 @@ PluginInsert::set_count (uint32_t num)
uint32_t diff = num - _plugins.size();
for (uint32_t n = 0; n < diff; ++n) {
add_plugin_with_activation (plugin_factory (_plugins[0]));
boost::shared_ptr<Plugin> p = plugin_factory (_plugins[0]);
add_plugin (p);
if (active ()) {
p->activate ();
}
if (require_state) {
/* XXX do something */
@ -1272,17 +1276,6 @@ PluginInsert::collect_signal_for_analysis (framecnt_t nframes)
_signal_analysis_collect_nframes_max = nframes;
}
/** Add a plugin to our list and activate it if we have already been activated */
void
PluginInsert::add_plugin_with_activation (boost::shared_ptr<Plugin> plugin)
{
plugin->set_insert_info (this);
_plugins.push_back (plugin);
if (active()) {
plugin->activate ();
}
}
/** Add a plugin to our list */
void
PluginInsert::add_plugin (boost::shared_ptr<Plugin> plugin)