2 Copyright (C) 2000-2006 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #include "libardour-config.h"
26 #include <sys/types.h>
35 #ifdef WINDOWS_VST_SUPPORT
36 #include "ardour/vst_info_file.h"
38 #include "pbd/basename.h"
40 #endif // WINDOWS_VST_SUPPORT
43 #include "ardour/vst_info_file.h"
44 #include "ardour/linux_vst_support.h"
45 #include "pbd/basename.h"
47 #endif //LXVST_SUPPORT
49 #include <glib/gstdio.h>
50 #include <glibmm/miscutils.h>
51 #include <glibmm/pattern.h>
53 #include "pbd/pathscanner.h"
54 #include "pbd/whitespace.h"
55 #include "pbd/file_utils.h"
57 #include "ardour/debug.h"
58 #include "ardour/filesystem_paths.h"
59 #include "ardour/ladspa.h"
60 #include "ardour/ladspa_plugin.h"
61 #include "ardour/plugin.h"
62 #include "ardour/plugin_manager.h"
63 #include "ardour/rc_configuration.h"
65 #include "ardour/ladspa_search_path.h"
68 #include "ardour/lv2_plugin.h"
71 #ifdef WINDOWS_VST_SUPPORT
72 #include "ardour/windows_vst_plugin.h"
76 #include "ardour/lxvst_plugin.h"
79 #ifdef AUDIOUNIT_SUPPORT
80 #include "ardour/audio_unit.h"
81 #include <Carbon/Carbon.h>
84 #include "pbd/error.h"
85 #include "pbd/stl_delete.h"
89 #include "ardour/debug.h"
91 using namespace ARDOUR;
95 PluginManager* PluginManager::_instance = 0;
98 PluginManager::instance()
101 _instance = new PluginManager;
106 PluginManager::PluginManager ()
107 : _windows_vst_plugin_info(0)
108 , _lxvst_plugin_info(0)
109 , _ladspa_plugin_info(0)
110 , _lv2_plugin_info(0)
119 if ((s = getenv ("LADSPA_RDF_PATH"))){
123 if (lrdf_path.length() == 0) {
124 lrdf_path = "/usr/local/share/ladspa/rdf:/usr/share/ladspa/rdf";
127 add_lrdf_data(lrdf_path);
128 add_ladspa_presets();
129 #ifdef WINDOWS_VST_SUPPORT
130 if (Config->get_use_windows_vst ()) {
131 add_windows_vst_presets ();
133 #endif /* WINDOWS_VST_SUPPORT */
136 if (Config->get_use_lxvst()) {
139 #endif /* Native LinuxVST support*/
141 if ((s = getenv ("VST_PATH"))) {
142 windows_vst_path = s;
143 } else if ((s = getenv ("VST_PLUGINS"))) {
144 windows_vst_path = s;
147 if ((s = getenv ("LXVST_PATH"))) {
149 } else if ((s = getenv ("LXVST_PLUGINS"))) {
153 if (_instance == 0) {
157 /* the plugin manager is constructed too early to use Profile */
159 if (getenv ("ARDOUR_SAE")) {
160 ladspa_plugin_whitelist.push_back (1203); // single band parametric
161 ladspa_plugin_whitelist.push_back (1772); // caps compressor
162 ladspa_plugin_whitelist.push_back (1913); // fast lookahead limiter
163 ladspa_plugin_whitelist.push_back (1075); // simple RMS expander
164 ladspa_plugin_whitelist.push_back (1061); // feedback delay line (max 5s)
165 ladspa_plugin_whitelist.push_back (1216); // gverb
166 ladspa_plugin_whitelist.push_back (2150); // tap pitch shifter
169 BootMessage (_("Discovering Plugins"));
173 PluginManager::~PluginManager()
179 PluginManager::refresh (bool cache_only)
181 DEBUG_TRACE (DEBUG::PluginManager, "PluginManager::refresh\n");
182 BootMessage (_("Discovering Plugins"));
188 #ifdef WINDOWS_VST_SUPPORT
189 if (Config->get_use_windows_vst()) {
190 windows_vst_refresh ();
192 #endif // WINDOWS_VST_SUPPORT
195 if(Config->get_use_lxvst()) {
198 #endif //Native linuxVST SUPPORT
200 #ifdef AUDIOUNIT_SUPPORT
204 PluginListChanged (); /* EMIT SIGNAL */
205 PluginScanMessage(X_("closeme"), "");
209 PluginManager::cancel_plugin_scan ()
215 PluginManager::clear_vst_cache ()
217 // see also libs/ardour/vst_info_file.cc - vstfx_infofile_path()
218 #ifdef WINDOWS_VST_SUPPORT
221 vector<string *> *fsi_files;
223 fsi_files = scanner (windows_vst_path, "\\.fsi$", true, true, -1, false);
225 for (vector<string *>::iterator i = fsi_files->begin(); i != fsi_files->end (); ++i) {
226 ::g_unlink((*i)->c_str());
229 vector_delete(fsi_files);
236 vector<string *> *fsi_files;
237 fsi_files = scanner (lxvst_path, "\\.fsi$", true, true, -1, false);
239 for (vector<string *>::iterator i = fsi_files->begin(); i != fsi_files->end (); ++i) {
240 ::g_unlink((*i)->c_str());
243 vector_delete(fsi_files);
247 #if (defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT)
249 string personal = get_personal_vst_info_cache_dir();
251 vector<string *> *fsi_files;
252 fsi_files = scanner (personal, "\\.fsi$", true, true, -1, false);
254 for (vector<string *>::iterator i = fsi_files->begin(); i != fsi_files->end (); ++i) {
255 ::g_unlink((*i)->c_str());
258 vector_delete(fsi_files);
264 PluginManager::clear_vst_blacklist ()
266 #ifdef WINDOWS_VST_SUPPORT
269 vector<string *> *fsi_files;
271 fsi_files = scanner (windows_vst_path, "\\.fsb$", true, true, -1, false);
273 for (vector<string *>::iterator i = fsi_files->begin(); i != fsi_files->end (); ++i) {
274 ::g_unlink((*i)->c_str());
277 vector_delete(fsi_files);
284 vector<string *> *fsi_files;
285 fsi_files = scanner (lxvst_path, "\\.fsb$", true, true, -1, false);
287 for (vector<string *>::iterator i = fsi_files->begin(); i != fsi_files->end (); ++i) {
288 ::g_unlink((*i)->c_str());
291 vector_delete(fsi_files);
295 #if (defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT)
297 string personal = get_personal_vst_blacklist_dir();
300 vector<string *> *fsi_files;
301 fsi_files = scanner (personal, "\\.fsb$", true, true, -1, false);
303 for (vector<string *>::iterator i = fsi_files->begin(); i != fsi_files->end (); ++i) {
304 ::g_unlink((*i)->c_str());
307 vector_delete(fsi_files);
313 PluginManager::ladspa_refresh ()
315 if (_ladspa_plugin_info) {
316 _ladspa_plugin_info->clear ();
318 _ladspa_plugin_info = new ARDOUR::PluginInfoList ();
321 /* allow LADSPA_PATH to augment, not override standard locations */
323 /* Only add standard locations to ladspa_path if it doesn't
324 * already contain them. Check for trailing G_DIR_SEPARATOR too.
327 vector<string> ladspa_modules;
329 DEBUG_TRACE (DEBUG::PluginManager, string_compose ("LADSPA: search along: [%1]\n", ladspa_search_path().to_string()));
331 Glib::PatternSpec so_extension_pattern("*.so");
332 Glib::PatternSpec dylib_extension_pattern("*.dylib");
333 Glib::PatternSpec dll_extension_pattern("*.dll");
335 find_matching_files_in_search_path (ladspa_search_path (),
336 so_extension_pattern, ladspa_modules);
338 find_matching_files_in_search_path (ladspa_search_path (),
339 dylib_extension_pattern, ladspa_modules);
341 find_matching_files_in_search_path (ladspa_search_path (),
342 dll_extension_pattern, ladspa_modules);
344 for (vector<std::string>::iterator i = ladspa_modules.begin(); i != ladspa_modules.end(); ++i) {
345 ARDOUR::PluginScanMessage(_("LADSPA"), *i);
346 ladspa_discover (*i);
350 static bool rdf_filter (const string &str, void* /*arg*/)
352 return str[0] != '.' &&
353 ((str.find(".rdf") == (str.length() - 4)) ||
354 (str.find(".rdfs") == (str.length() - 5)) ||
355 (str.find(".n3") == (str.length() - 3)) ||
356 (str.find(".ttl") == (str.length() - 4)));
360 PluginManager::add_ladspa_presets()
362 add_presets ("ladspa");
366 PluginManager::add_windows_vst_presets()
368 add_presets ("windows-vst");
372 PluginManager::add_lxvst_presets()
374 add_presets ("lxvst");
378 PluginManager::add_presets(string domain)
382 vector<string *> *presets;
383 vector<string *>::iterator x;
386 if ((envvar = getenv ("HOME")) == 0) {
390 string path = string_compose("%1/.%2/rdf", envvar, domain);
391 presets = scanner (path, rdf_filter, 0, false, true);
394 for (x = presets->begin(); x != presets->end (); ++x) {
395 string file = "file:" + **x;
396 if (lrdf_read_file(file.c_str())) {
397 warning << string_compose(_("Could not parse rdf file: %1"), *x) << endmsg;
401 vector_delete (presets);
407 PluginManager::add_lrdf_data (const string &path)
411 vector<string *>* rdf_files;
412 vector<string *>::iterator x;
414 rdf_files = scanner (path, rdf_filter, 0, false, true);
417 for (x = rdf_files->begin(); x != rdf_files->end (); ++x) {
418 const string uri(string("file://") + **x);
420 if (lrdf_read_file(uri.c_str())) {
421 warning << "Could not parse rdf file: " << uri << endmsg;
425 vector_delete (rdf_files);
431 PluginManager::ladspa_discover (string path)
433 DEBUG_TRACE (DEBUG::PluginManager, string_compose ("Checking for LADSPA plugin at %1\n", path));
435 Glib::Module module(path);
436 const LADSPA_Descriptor *descriptor;
437 LADSPA_Descriptor_Function dfunc;
441 error << string_compose(_("LADSPA: cannot load module \"%1\" (%2)"),
442 path, Glib::Module::get_last_error()) << endmsg;
447 if (!module.get_symbol("ladspa_descriptor", func)) {
448 error << string_compose(_("LADSPA: module \"%1\" has no descriptor function."), path) << endmsg;
449 error << Glib::Module::get_last_error() << endmsg;
453 dfunc = (LADSPA_Descriptor_Function)func;
455 DEBUG_TRACE (DEBUG::PluginManager, string_compose ("LADSPA plugin found at %1\n", path));
457 for (uint32_t i = 0; ; ++i) {
458 if ((descriptor = dfunc (i)) == 0) {
462 if (!ladspa_plugin_whitelist.empty()) {
463 if (find (ladspa_plugin_whitelist.begin(), ladspa_plugin_whitelist.end(), descriptor->UniqueID) == ladspa_plugin_whitelist.end()) {
468 PluginInfoPtr info(new LadspaPluginInfo);
469 info->name = descriptor->Name;
470 info->category = get_ladspa_category(descriptor->UniqueID);
471 info->creator = descriptor->Maker;
474 info->n_inputs = ChanCount();
475 info->n_outputs = ChanCount();
476 info->type = ARDOUR::LADSPA;
479 snprintf (buf, sizeof (buf), "%lu", descriptor->UniqueID);
480 info->unique_id = buf;
482 for (uint32_t n=0; n < descriptor->PortCount; ++n) {
483 if ( LADSPA_IS_PORT_AUDIO (descriptor->PortDescriptors[n]) ) {
484 if ( LADSPA_IS_PORT_INPUT (descriptor->PortDescriptors[n]) ) {
485 info->n_inputs.set_audio(info->n_inputs.n_audio() + 1);
487 else if ( LADSPA_IS_PORT_OUTPUT (descriptor->PortDescriptors[n]) ) {
488 info->n_outputs.set_audio(info->n_outputs.n_audio() + 1);
493 if(_ladspa_plugin_info->empty()){
494 _ladspa_plugin_info->push_back (info);
497 //Ensure that the plugin is not already in the plugin list.
501 for (PluginInfoList::const_iterator i = _ladspa_plugin_info->begin(); i != _ladspa_plugin_info->end(); ++i) {
502 if(0 == info->unique_id.compare((*i)->unique_id)){
508 _ladspa_plugin_info->push_back (info);
511 DEBUG_TRACE (DEBUG::PluginManager, string_compose ("Found LADSPA plugin, name: %1, Inputs: %2, Outputs: %3\n", info->name, info->n_inputs, info->n_outputs));
514 // GDB WILL NOT LIKE YOU IF YOU DO THIS
521 PluginManager::get_ladspa_category (uint32_t plugin_id)
525 lrdf_statement pattern;
527 snprintf(buf, sizeof(buf), "%s%" PRIu32, LADSPA_BASE, plugin_id);
528 pattern.subject = buf;
529 pattern.predicate = const_cast<char*>(RDF_TYPE);
531 pattern.object_type = lrdf_uri;
533 lrdf_statement* matches1 = lrdf_matches (&pattern);
539 pattern.subject = matches1->object;
540 pattern.predicate = const_cast<char*>(LADSPA_BASE "hasLabel");
542 pattern.object_type = lrdf_literal;
544 lrdf_statement* matches2 = lrdf_matches (&pattern);
545 lrdf_free_statements(matches1);
551 string label = matches2->object;
552 lrdf_free_statements(matches2);
554 /* Kludge LADSPA class names to be singular and match LV2 class names.
555 This avoids duplicate plugin menus for every class, which is necessary
556 to make the plugin category menu at all usable, but is obviously a
559 In the short term, lrdf could be updated so the labels match and a new
560 release made. To support both specs, we should probably be mapping the
561 URIs to the same category in code and perhaps tweaking that hierarchy
562 dynamically to suit the user. Personally, I (drobilla) think that time
563 is better spent replacing the little-used LRDF.
565 In the longer term, we will abandon LRDF entirely in favour of LV2 and
566 use that class hierarchy. Aside from fixing this problem properly, that
567 will also allow for translated labels. SWH plugins have been LV2 for
568 ages; TAP needs porting. I don't know of anything else with LRDF data.
570 if (label == "Utilities") {
572 } else if (label == "Pitch shifters") {
573 return "Pitch Shifter";
574 } else if (label != "Dynamics" && label != "Chorus"
575 &&label[label.length() - 1] == 's'
576 && label[label.length() - 2] != 's') {
577 return label.substr(0, label.length() - 1);
588 PluginManager::lv2_refresh ()
590 DEBUG_TRACE (DEBUG::PluginManager, "LV2: refresh\n");
591 delete _lv2_plugin_info;
592 _lv2_plugin_info = LV2PluginInfo::discover();
596 #ifdef AUDIOUNIT_SUPPORT
598 PluginManager::au_refresh ()
600 DEBUG_TRACE (DEBUG::PluginManager, "AU: refresh\n");
601 delete _au_plugin_info;
602 _au_plugin_info = AUPluginInfo::discover();
607 #ifdef WINDOWS_VST_SUPPORT
610 PluginManager::windows_vst_refresh (bool cache_only)
612 if (_windows_vst_plugin_info) {
613 _windows_vst_plugin_info->clear ();
615 _windows_vst_plugin_info = new ARDOUR::PluginInfoList();
618 if (windows_vst_path.length() == 0) {
619 windows_vst_path = "/usr/local/lib/vst:/usr/lib/vst";
622 windows_vst_discover_from_path (windows_vst_path, cache_only);
626 PluginManager::add_windows_vst_directory (string path)
628 if (windows_vst_discover_from_path (path) == 0) {
629 windows_vst_path += ':';
630 windows_vst_path += path;
636 static bool windows_vst_filter (const string& str, void * /*arg*/)
638 /* Not a dotfile, has a prefix before a period, suffix is "dll" */
640 return str[0] != '.' && (str.length() > 4 && str.find (".dll") == (str.length() - 4));
644 PluginManager::windows_vst_discover_from_path (string path, bool cache_only)
647 vector<string *> *plugin_objects;
648 vector<string *>::iterator x;
651 DEBUG_TRACE (DEBUG::PluginManager, string_compose ("detecting Windows VST plugins along %1\n", path));
653 plugin_objects = scanner (windows_vst_path, windows_vst_filter, 0, false, true);
655 if (plugin_objects) {
656 for (x = plugin_objects->begin(); x != plugin_objects->end (); ++x) {
657 ARDOUR::PluginScanMessage(_("VST"), **x);
658 windows_vst_discover (**x, cache_only);
661 vector_delete (plugin_objects);
668 PluginManager::windows_vst_discover (string path, bool cache_only)
670 DEBUG_TRACE (DEBUG::PluginManager, string_compose ("windows_vst_discover '%1'\n", path));
672 vector<VSTInfo*> * finfos = vstfx_get_info_fst (const_cast<char *> (path.c_str()),
673 cache_only ? VST_SCAN_CACHE_ONLY : VST_SCAN_USE_APP);
675 if (finfos->empty()) {
676 DEBUG_TRACE (DEBUG::PluginManager, string_compose ("Cannot get Windows VST information from '%1'\n", path));
680 uint32_t discovered = 0;
681 for (vector<VSTInfo *>::iterator x = finfos->begin(); x != finfos->end(); ++x) {
685 if (!finfo->canProcessReplacing) {
686 warning << string_compose (_("VST plugin %1 does not support processReplacing, and so cannot be used in %2 at this time"),
687 finfo->name, PROGRAM_NAME)
692 PluginInfoPtr info (new WindowsVSTPluginInfo);
694 /* what a joke freeware VST is */
696 if (!strcasecmp ("The Unnamed plugin", finfo->name)) {
697 info->name = PBD::basename_nosuffix (path);
699 info->name = finfo->name;
703 snprintf (buf, sizeof (buf), "%d", finfo->UniqueID);
704 info->unique_id = buf;
705 info->category = "VST";
707 info->creator = finfo->creator;
709 info->n_inputs.set_audio (finfo->numInputs);
710 info->n_outputs.set_audio (finfo->numOutputs);
711 info->n_inputs.set_midi (finfo->wantMidi ? 1 : 0);
712 info->type = ARDOUR::Windows_VST;
714 // TODO: check dup-IDs (lxvst AND windows vst)
715 bool duplicate = false;
717 if (!_windows_vst_plugin_info->empty()) {
718 for (PluginInfoList::iterator i =_windows_vst_plugin_info->begin(); i != _windows_vst_plugin_info->end(); ++i) {
719 if ((info->type == (*i)->type)&&(info->unique_id == (*i)->unique_id)) {
720 warning << "Ignoring duplicate Windows VST plugin " << info->name << "\n";
728 DEBUG_TRACE (DEBUG::PluginManager, string_compose ("Windows VST plugin ID '%1'\n", info->unique_id));
729 _windows_vst_plugin_info->push_back (info);
734 vstfx_free_info_list (finfos);
735 return discovered > 0 ? 0 : -1;
738 #endif // WINDOWS_VST_SUPPORT
743 PluginManager::lxvst_refresh (bool cache_only)
745 if (_lxvst_plugin_info) {
746 _lxvst_plugin_info->clear ();
748 _lxvst_plugin_info = new ARDOUR::PluginInfoList();
751 if (lxvst_path.length() == 0) {
752 lxvst_path = "/usr/local/lib64/lxvst:/usr/local/lib/lxvst:/usr/lib64/lxvst:/usr/lib/lxvst:"
753 "/usr/local/lib64/linux_vst:/usr/local/lib/linux_vst:/usr/lib64/linux_vst:/usr/lib/linux_vst:"
754 "/usr/lib/vst:/usr/local/lib/vst";
757 lxvst_discover_from_path (lxvst_path, cache_only);
761 PluginManager::add_lxvst_directory (string path)
763 if (lxvst_discover_from_path (path) == 0) {
771 static bool lxvst_filter (const string& str, void *)
773 /* Not a dotfile, has a prefix before a period, suffix is "so" */
775 return str[0] != '.' && (str.length() > 3 && str.find (".so") == (str.length() - 3));
779 PluginManager::lxvst_discover_from_path (string path, bool cache_only)
782 vector<string *> *plugin_objects;
783 vector<string *>::iterator x;
790 DEBUG_TRACE (DEBUG::PluginManager, string_compose ("Discovering linuxVST plugins along %1\n", path));
792 plugin_objects = scanner (lxvst_path, lxvst_filter, 0, false, true);
794 if (plugin_objects) {
795 for (x = plugin_objects->begin(); x != plugin_objects->end (); ++x) {
796 ARDOUR::PluginScanMessage(_("LXVST"), **x);
797 lxvst_discover (**x, cache_only);
800 vector_delete (plugin_objects);
807 PluginManager::lxvst_discover (string path, bool cache_only)
809 DEBUG_TRACE (DEBUG::PluginManager, string_compose ("checking apparent LXVST plugin at %1\n", path));
811 vector<VSTInfo*> * finfos = vstfx_get_info_lx (const_cast<char *> (path.c_str()),
812 cache_only ? VST_SCAN_CACHE_ONLY : VST_SCAN_USE_APP);
814 if (finfos->empty()) {
815 DEBUG_TRACE (DEBUG::PluginManager, string_compose ("Cannot get Linux VST information from '%1'\n", path));
819 uint32_t discovered = 0;
820 for (vector<VSTInfo *>::iterator x = finfos->begin(); x != finfos->end(); ++x) {
824 if (!finfo->canProcessReplacing) {
825 warning << string_compose (_("linuxVST plugin %1 does not support processReplacing, and so cannot be used in %2 at this time"),
826 finfo->name, PROGRAM_NAME)
831 PluginInfoPtr info(new LXVSTPluginInfo);
833 if (!strcasecmp ("The Unnamed plugin", finfo->name)) {
834 info->name = PBD::basename_nosuffix (path);
836 info->name = finfo->name;
840 snprintf (buf, sizeof (buf), "%d", finfo->UniqueID);
841 info->unique_id = buf;
842 info->category = "linuxVSTs";
844 info->creator = finfo->creator;
846 info->n_inputs.set_audio (finfo->numInputs);
847 info->n_outputs.set_audio (finfo->numOutputs);
848 info->n_inputs.set_midi (finfo->wantMidi ? 1 : 0);
849 info->type = ARDOUR::LXVST;
851 /* Make sure we don't find the same plugin in more than one place along
852 the LXVST_PATH We can't use a simple 'find' because the path is included
853 in the PluginInfo, and that is the one thing we can be sure MUST be
854 different if a duplicate instance is found. So we just compare the type
855 and unique ID (which for some VSTs isn't actually unique...)
858 // TODO: check dup-IDs with windowsVST, too
859 bool duplicate = false;
860 if (!_lxvst_plugin_info->empty()) {
861 for (PluginInfoList::iterator i =_lxvst_plugin_info->begin(); i != _lxvst_plugin_info->end(); ++i) {
862 if ((info->type == (*i)->type)&&(info->unique_id == (*i)->unique_id)) {
863 warning << "Ignoring duplicate Linux VST plugin " << info->name << "\n";
871 _lxvst_plugin_info->push_back (info);
876 vstfx_free_info_list (finfos);
877 return discovered > 0 ? 0 : -1;
880 #endif // LXVST_SUPPORT
883 PluginManager::PluginStatusType
884 PluginManager::get_status (const PluginInfoPtr& pi)
886 PluginStatus ps (pi->type, pi->unique_id);
887 PluginStatusList::const_iterator i = find (statuses.begin(), statuses.end(), ps);
888 if (i == statuses.end() ) {
896 PluginManager::save_statuses ()
899 std::string path = Glib::build_filename (user_config_directory(), "plugin_statuses");
901 ofs.open (path.c_str(), ios_base::openmode (ios::out|ios::trunc));
907 for (PluginStatusList::iterator i = statuses.begin(); i != statuses.end(); ++i) {
919 ofs << "Windows-VST";
928 switch ((*i).status) {
941 ofs << (*i).unique_id;;
949 PluginManager::load_statuses ()
951 std::string path = Glib::build_filename (user_config_directory(), "plugin_statuses");
952 ifstream ifs (path.c_str());
962 PluginStatusType status;
979 /* rest of the line is the plugin ID */
981 ifs.getline (buf, sizeof (buf), '\n');
986 if (sstatus == "Normal") {
988 } else if (sstatus == "Favorite") {
990 } else if (sstatus == "Hidden") {
993 error << string_compose (_("unknown plugin status type \"%1\" - all entries ignored"), sstatus)
999 if (stype == "LADSPA") {
1001 } else if (stype == "AudioUnit") {
1003 } else if (stype == "LV2") {
1005 } else if (stype == "Windows-VST") {
1007 } else if (stype == "LXVST") {
1010 error << string_compose (_("unknown plugin type \"%1\" - ignored"), stype)
1016 strip_whitespace_edges (id);
1017 set_status (type, id, status);
1024 PluginManager::set_status (PluginType t, string id, PluginStatusType status)
1026 PluginStatus ps (t, id, status);
1027 statuses.erase (ps);
1029 if (status == Normal) {
1033 statuses.insert (ps);
1036 ARDOUR::PluginInfoList&
1037 PluginManager::windows_vst_plugin_info ()
1039 #ifdef WINDOWS_VST_SUPPORT
1040 if (!_windows_vst_plugin_info) {
1041 windows_vst_refresh ();
1043 return *_windows_vst_plugin_info;
1045 return _empty_plugin_info;
1049 ARDOUR::PluginInfoList&
1050 PluginManager::lxvst_plugin_info ()
1052 #ifdef LXVST_SUPPORT
1053 if (!_lxvst_plugin_info)
1055 return *_lxvst_plugin_info;
1057 return _empty_plugin_info;
1061 ARDOUR::PluginInfoList&
1062 PluginManager::ladspa_plugin_info ()
1064 if (!_ladspa_plugin_info)
1066 return *_ladspa_plugin_info;
1069 ARDOUR::PluginInfoList&
1070 PluginManager::lv2_plugin_info ()
1073 if (!_lv2_plugin_info)
1075 return *_lv2_plugin_info;
1077 return _empty_plugin_info;
1081 ARDOUR::PluginInfoList&
1082 PluginManager::au_plugin_info ()
1084 #ifdef AUDIOUNIT_SUPPORT
1085 if (!_au_plugin_info)
1087 return *_au_plugin_info;
1089 return _empty_plugin_info;