return;
}
- string path = compose("%1/.%2/rdf", envvar, domain);
+ string path = string_compose("%1/.%2/rdf", envvar, domain);
presets = scanner (path, rdf_filter, 0, true, true);
if (presets) {
for (x = presets->begin(); x != presets->end (); ++x) {
string file = "file:" + **x;
if (lrdf_read_file(file.c_str())) {
- warning << compose(_("Could not parse rdf file: %1"), *x) << endmsg;
+ warning << string_compose(_("Could not parse rdf file: %1"), *x) << endmsg;
}
}
}
const char *errstr;
if ((module = dlopen (path.c_str(), RTLD_NOW)) == 0) {
- error << compose(_("LADSPA: cannot load module \"%1\" (%2)"), path, dlerror()) << endmsg;
+ error << string_compose(_("LADSPA: cannot load module \"%1\" (%2)"), path, dlerror()) << endmsg;
return -1;
}
dfunc = (LADSPA_Descriptor_Function) dlsym (module, "ladspa_descriptor");
if ((errstr = dlerror()) != 0) {
- error << compose(_("LADSPA: module \"%1\" has no descriptor function."), path) << endmsg;
+ error << string_compose(_("LADSPA: module \"%1\" has no descriptor function."), path) << endmsg;
error << errstr << endmsg;
dlclose (module);
return -1;
info->n_inputs = 0;
info->n_outputs = 0;
info->type = PluginInfo::LADSPA;
+ info->unique_id = descriptor->UniqueID;
for (uint32_t n=0; n < descriptor->PortCount; ++n) {
if ( LADSPA_IS_PORT_AUDIO (descriptor->PortDescriptors[n]) ) {
FSTHandle* handle;
if ((handle = fst_load (info->path.c_str())) == 0) {
- error << compose(_("VST: cannot load module from \"%1\""), info->path) << endmsg;
+ error << string_compose(_("VST: cannot load module from \"%1\""), info->path) << endmsg;
} else {
plugin = new VSTPlugin (_engine, session, handle);
}
} else {
if ((module = dlopen (info->path.c_str(), RTLD_NOW)) == 0) {
- error << compose(_("LADSPA: cannot load module from \"%1\""), info->path) << endmsg;
+ error << string_compose(_("LADSPA: cannot load module from \"%1\""), info->path) << endmsg;
error << dlerror() << endmsg;
} else {
plugin = new LadspaPlugin (module, _engine, session, info->index, session.frame_rate());
}
Plugin *
-ARDOUR::find_plugin(Session& session, string name, PluginInfo::Type type)
+ARDOUR::find_plugin(Session& session, string name, long unique_id, PluginInfo::Type type)
{
PluginManager *mgr = PluginManager::the_manager();
list<PluginInfo *>::iterator i;
break;
case PluginInfo::VST:
plugs = &mgr->vst_plugin_info();
+ unique_id = 0; // VST plugins don't have a unique id.
break;
}
for (i = plugs->begin(); i != plugs->end(); ++i) {
- if ((*i)->name == name) {
+ if ((name == "" || (*i)->name == name) &&
+ (unique_id == 0 || (*i)->unique_id == unique_id)) {
return mgr->load (session, *i);
}
}
}
if (!finfo->canProcessReplacing) {
- warning << compose (_("VST plugin %1 does not support processReplacing, and so cannot be used in ardour at this time"),
+ warning << string_compose (_("VST plugin %1 does not support processReplacing, and so cannot be used in ardour at this time"),
finfo->name)
<< endl;
}