- if (set_uris) {
- for (uint32_t i = 0; i < (uint32_t) set_uris->count; ++i) {
- if (char* label = lrdf_get_label(set_uris->items[i])) {
- labels.push_back(label);
- presets[label] = set_uris->items[i];
- }
+#ifdef LXVST_SUPPORT
+ case ARDOUR::LXVST:
+ plugs = mgr.lxvst_plugin_info();
+ break;
+#endif
+
+#ifdef AUDIOUNIT_SUPPORT
+ case ARDOUR::AudioUnit:
+ plugs = mgr.au_plugin_info();
+ break;
+#endif
+
+ default:
+ return PluginPtr ((Plugin *) 0);
+ }
+
+ PluginInfoList::iterator i;
+
+ for (i = plugs.begin(); i != plugs.end(); ++i) {
+ if (identifier == (*i)->unique_id){
+ return (*i)->load (session);
+ }
+ }
+
+#ifdef WINDOWS_VST_SUPPORT
+ /* hmm, we didn't find it. could be because in older versions of Ardour.
+ we used to store the name of a VST plugin, not its unique ID. so try
+ again.
+ */
+
+ for (i = plugs.begin(); i != plugs.end(); ++i) {
+ if (identifier == (*i)->name){
+ return (*i)->load (session);
+ }
+ }
+#endif
+
+#ifdef LXVST_SUPPORT
+ /* hmm, we didn't find it. could be because in older versions of Ardour.
+ we used to store the name of a VST plugin, not its unique ID. so try
+ again.
+ */
+
+ for (i = plugs.begin(); i != plugs.end(); ++i) {
+ if (identifier == (*i)->name){
+ return (*i)->load (session);