summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/ardour/plugin_manager.h5
-rw-r--r--libs/ardour/ardour/rc_configuration_vars.h12
-rw-r--r--libs/ardour/lv2_plugin.cc4
-rw-r--r--libs/ardour/plugin_manager.cc67
-rw-r--r--libs/ardour/vst_info_file.cc6
5 files changed, 83 insertions, 11 deletions
diff --git a/libs/ardour/ardour/plugin_manager.h b/libs/ardour/ardour/plugin_manager.h
index bee1c68704..0e5919095a 100644
--- a/libs/ardour/ardour/plugin_manager.h
+++ b/libs/ardour/ardour/plugin_manager.h
@@ -51,6 +51,9 @@ class LIBARDOUR_API PluginManager : public boost::noncopyable {
ARDOUR::PluginInfoList &au_plugin_info ();
void refresh ();
+ void cancel_plugin_scan();
+ void clear_vst_cache ();
+ void clear_vst_blacklist ();
int add_windows_vst_directory (std::string dirpath);
int add_lxvst_directory (std::string dirpath);
@@ -106,6 +109,8 @@ class LIBARDOUR_API PluginManager : public boost::noncopyable {
std::string windows_vst_path;
std::string lxvst_path;
+ bool cancel_scan;
+
void ladspa_refresh ();
void windows_vst_refresh ();
void lxvst_refresh ();
diff --git a/libs/ardour/ardour/rc_configuration_vars.h b/libs/ardour/ardour/rc_configuration_vars.h
index 19500ccf74..c94c570560 100644
--- a/libs/ardour/ardour/rc_configuration_vars.h
+++ b/libs/ardour/ardour/rc_configuration_vars.h
@@ -168,8 +168,6 @@ CONFIG_VARIABLE (bool, replicate_missing_region_channels, "replicate-missing-reg
CONFIG_VARIABLE (bool, hiding_groups_deactivates_groups, "hiding-groups-deactivates-groups", true)
CONFIG_VARIABLE (bool, verify_remove_last_capture, "verify-remove-last-capture", true)
CONFIG_VARIABLE (bool, no_new_session_dialog, "no-new-session-dialog", false)
-CONFIG_VARIABLE (bool, use_windows_vst, "use-windows-vst", true)
-CONFIG_VARIABLE (bool, use_lxvst, "use-lxvst", true)
CONFIG_VARIABLE (bool, save_history, "save-history", true)
CONFIG_VARIABLE (int32_t, saved_history_depth, "save-history-depth", 20)
CONFIG_VARIABLE (int32_t, history_depth, "history-depth", 20)
@@ -179,7 +177,6 @@ CONFIG_VARIABLE (uint32_t, periodic_safety_backup_interval, "periodic-safety-bac
CONFIG_VARIABLE (float, automation_interval_msecs, "automation-interval-msecs", 30)
CONFIG_VARIABLE (bool, only_copy_imported_files, "only-copy-imported-files", false)
CONFIG_VARIABLE (bool, keep_tearoffs, "keep-tearoffs", false)
-CONFIG_VARIABLE (bool, new_plugins_active, "new-plugins-active", true)
CONFIG_VARIABLE (std::string, keyboard_layout, "keyboard-layout", "ansi")
CONFIG_VARIABLE (std::string, default_bindings, "default-bindings", "ardour")
CONFIG_VARIABLE (bool, default_narrow_ms, "default-narrow_ms", false)
@@ -197,11 +194,18 @@ CONFIG_VARIABLE (gain_t, max_gain, "max-gain", 2.0) /* +6.0dB */
CONFIG_VARIABLE (bool, update_editor_during_summary_drag, "update-editor-during-summary-drag", true)
CONFIG_VARIABLE (bool, never_display_periodic_midi, "never-display-periodic-midi", true)
CONFIG_VARIABLE (bool, sound_midi_notes, "sound-midi-notes", false)
-CONFIG_VARIABLE (bool, use_plugin_own_gui, "use-plugin-own-gui", true)
CONFIG_VARIABLE (uint32_t, max_recent_sessions, "max-recent-sessions", 10)
CONFIG_VARIABLE (double, automation_thinning_factor, "automation-thinning-factor", 20.0)
CONFIG_VARIABLE (std::string, freesound_download_dir, "freesound-download-dir", Glib::get_home_dir() + "/Freesound/snd")
+/* plugin related */
+
+CONFIG_VARIABLE (bool, new_plugins_active, "new-plugins-active", true)
+CONFIG_VARIABLE (bool, use_plugin_own_gui, "use-plugin-own-gui", true)
+CONFIG_VARIABLE (bool, use_windows_vst, "use-windows-vst", true)
+CONFIG_VARIABLE (bool, use_lxvst, "use-lxvst", true)
+CONFIG_VARIABLE (bool, show_plugin_scan_window, "show-plugin-scan-window", true)
+
/* denormal management */
CONFIG_VARIABLE (bool, denormal_protection, "denormal-protection", false)
diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc
index d3efaa4c61..a9b21924ed 100644
--- a/libs/ardour/lv2_plugin.cc
+++ b/libs/ardour/lv2_plugin.cc
@@ -2090,7 +2090,9 @@ LV2PluginInfo::discover()
PluginInfoList* plugs = new PluginInfoList;
const LilvPlugins* plugins = lilv_world_get_all_plugins(_world.world);
- info << "LV2: Discovering " << lilv_plugins_size(plugins) << " plugins" << endmsg;
+ if (!Config->get_show_plugin_scan_window()) {
+ info << "LV2: Discovering " << lilv_plugins_size(plugins) << " plugins" << endmsg;
+ }
LILV_FOREACH(plugins, i, plugins) {
const LilvPlugin* p = lilv_plugins_get(plugins, i);
diff --git a/libs/ardour/plugin_manager.cc b/libs/ardour/plugin_manager.cc
index e6a0b40ae5..6a20191cf1 100644
--- a/libs/ardour/plugin_manager.cc
+++ b/libs/ardour/plugin_manager.cc
@@ -46,6 +46,7 @@
#include <cstring>
#endif //LXVST_SUPPORT
+#include <glib/gstdio.h>
#include <glibmm/miscutils.h>
#include <glibmm/pattern.h>
@@ -108,6 +109,7 @@ PluginManager::PluginManager ()
, _ladspa_plugin_info(0)
, _lv2_plugin_info(0)
, _au_plugin_info(0)
+ , cancel_scan(false)
{
char* s;
string lrdf_path;
@@ -204,6 +206,69 @@ PluginManager::refresh ()
}
void
+PluginManager::cancel_plugin_scan ()
+{
+ // TODO
+}
+
+void
+PluginManager::clear_vst_cache ()
+{
+ // see also libs/ardour/vst_info_file.cc - vstfx_infofile_path()
+#ifdef WINDOWS_VST_SUPPORT
+ {
+ PathScanner scanner;
+ vector<string *> *fsi_files;
+
+ fsi_files = scanner (windows_vst_path, "\\.fsi$", true, true, -1, false);
+ if (fsi_files) {
+ for (vector<string *>::iterator i = fsi_files->begin(); i != fsi_files->end (); ++i) {
+ ::g_unlink((*i)->c_str());
+ }
+ }
+ vector_delete(fsi_files);
+ }
+#endif
+
+#ifdef LXVST_SUPPORT
+ {
+ PathScanner scanner;
+ vector<string *> *fsi_files;
+ fsi_files = scanner (lxvst_path, "\\.fsi$", true, true, -1, false);
+ if (fsi_files) {
+ for (vector<string *>::iterator i = fsi_files->begin(); i != fsi_files->end (); ++i) {
+ ::g_unlink((*i)->c_str());
+ }
+ }
+ vector_delete(fsi_files);
+ }
+#endif
+
+#if (defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT)
+ {
+ string personal;
+ personal = Glib::build_filename (Glib::get_home_dir (), ".fst");
+
+ PathScanner scanner;
+ vector<string *> *fsi_files;
+ fsi_files = scanner (personal, "\\.fsi$", true, true, -1, false);
+ if (fsi_files) {
+ for (vector<string *>::iterator i = fsi_files->begin(); i != fsi_files->end (); ++i) {
+ ::g_unlink((*i)->c_str());
+ }
+ }
+ vector_delete(fsi_files);
+ }
+#endif
+}
+
+void
+PluginManager::clear_vst_blacklist ()
+{
+ // TODO -> libs/ardour/vst_info_file.cc
+}
+
+void
PluginManager::ladspa_refresh ()
{
if (_ladspa_plugin_info) {
@@ -567,7 +632,6 @@ PluginManager::windows_vst_discover (string path)
if (finfos->empty()) {
DEBUG_TRACE (DEBUG::PluginManager, string_compose ("Cannot get Windows VST information from '%1'\n", path));
- warning << "Cannot get Windows VST information from " << path << endmsg;
return -1;
}
@@ -706,7 +770,6 @@ PluginManager::lxvst_discover (string path)
if (finfos->empty()) {
DEBUG_TRACE (DEBUG::PluginManager, string_compose ("Cannot get Linux VST information from '%1'\n", path));
- warning << "Cannot get Linux VST information from " << path << endmsg;
return -1;
}
diff --git a/libs/ardour/vst_info_file.cc b/libs/ardour/vst_info_file.cc
index d5a082f018..67117b2a6a 100644
--- a/libs/ardour/vst_info_file.cc
+++ b/libs/ardour/vst_info_file.cc
@@ -610,7 +610,7 @@ vstfx_instantiate_and_get_info_fst (
VSTHandle* h;
VSTState* vstfx;
if(!(h = fst_load(dllpath))) {
- PBD::warning << "Cannot get VST information from " << dllpath << ": load failed." << endmsg;
+ PBD::warning << "Cannot get Windows VST information from " << dllpath << ": load failed." << endmsg;
return false;
}
@@ -619,7 +619,7 @@ vstfx_instantiate_and_get_info_fst (
if(!(vstfx = fst_instantiate(h, simple_master_callback, 0))) {
fst_unload(&h);
vstfx_current_loading_id = 0;
- PBD::warning << "Cannot get VST information from " << dllpath << ": instantiation failed." << endmsg;
+ PBD::warning << "Cannot get Windows VST information from " << dllpath << ": instantiation failed." << endmsg;
return false;
}
vstfx_current_loading_id = 0;
@@ -642,7 +642,6 @@ vstfx_get_info (const char* dllpath, int type)
// TODO pre-check file extension ?
if (vstfx_get_info_from_file(dllpath, infos)) {
- PBD::info << "using cache for VST plugin '" << dllpath << "'" << endmsg;
return infos;
}
@@ -659,7 +658,6 @@ vstfx_get_info (const char* dllpath, int type)
}
if (!ok) {
- PBD::warning << "Cannot get VST information for " << dllpath << "." << endmsg;
return infos;
}