#include "ardour/plugin_manager.h"
#include "ardour/rc_configuration.h"
-#include "ardour/ladspa_search_path.h"
-#include "ardour/vst_search_path.h"
+#include "ardour/search_paths.h"
#ifdef LV2_SUPPORT
#include "ardour/lv2_plugin.h"
, _ladspa_plugin_info(0)
, _lv2_plugin_info(0)
, _au_plugin_info(0)
- , cancel_scan(false)
+ , _cancel_scan(false)
+ , _cancel_timeout(false)
{
char* s;
string lrdf_path;
- if (!PBD::find_file_in_search_path (
- PBD::Searchpath(Glib::build_filename(ARDOUR::ardour_dll_directory(), "fst")),
- "ardour-vst-scanner", scanner_bin_path)) {
- PBD::warning << "VST scanner app not found.'" << endmsg;
+ string scan_p = Glib::build_filename(ARDOUR::ardour_dll_directory(), "fst");
+ if (!PBD::find_file_in_search_path ( PBD::Searchpath(scan_p), "ardour-vst-scanner", scanner_bin_path)) {
+ PBD::warning << "VST scanner app (ardour-vst-scanner) not found in path " << scan_p << endmsg;
}
load_statuses ();
PluginManager::refresh (bool cache_only)
{
DEBUG_TRACE (DEBUG::PluginManager, "PluginManager::refresh\n");
- cancel_scan = false;
+ _cancel_scan = false;
BootMessage (_("Scanning LADSPA Plugins"));
ladspa_refresh ();
BootMessage (_("Plugin Scan Complete..."));
PluginListChanged (); /* EMIT SIGNAL */
PluginScanMessage(X_("closeme"), "", false);
- cancel_scan = false;
+ _cancel_scan = false;
}
void
PluginManager::cancel_plugin_scan ()
{
- cancel_scan = true;
+ _cancel_scan = true;
+}
+
+void
+PluginManager::cancel_plugin_timeout ()
+{
+ _cancel_timeout = true;
}
void
{
DEBUG_TRACE (DEBUG::PluginManager, string_compose ("windows_vst_discover '%1'\n", path));
+ _cancel_timeout = false;
vector<VSTInfo*> * finfos = vstfx_get_info_fst (const_cast<char *> (path.c_str()),
cache_only ? VST_SCAN_CACHE_ONLY : VST_SCAN_USE_APP);
info->index = 0;
info->n_inputs.set_audio (finfo->numInputs);
info->n_outputs.set_audio (finfo->numOutputs);
- info->n_inputs.set_midi (finfo->wantMidi ? 1 : 0);
+ info->n_inputs.set_midi ((finfo->wantMidi&1) ? 1 : 0);
+ info->n_outputs.set_midi ((finfo->wantMidi&2) ? 1 : 0);
info->type = ARDOUR::Windows_VST;
// TODO: check dup-IDs (lxvst AND windows vst)
{
DEBUG_TRACE (DEBUG::PluginManager, string_compose ("checking apparent LXVST plugin at %1\n", path));
+ _cancel_timeout = false;
vector<VSTInfo*> * finfos = vstfx_get_info_lx (const_cast<char *> (path.c_str()),
cache_only ? VST_SCAN_CACHE_ONLY : VST_SCAN_USE_APP);
info->index = 0;
info->n_inputs.set_audio (finfo->numInputs);
info->n_outputs.set_audio (finfo->numOutputs);
- info->n_inputs.set_midi (finfo->wantMidi ? 1 : 0);
+ info->n_inputs.set_midi ((finfo->wantMidi&1) ? 1 : 0);
+ info->n_outputs.set_midi ((finfo->wantMidi&2) ? 1 : 0);
info->type = ARDOUR::LXVST;
/* Make sure we don't find the same plugin in more than one place along