mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
[VST] scan timeout display and per plugin timeout override.
This commit is contained in:
parent
da73b0f670
commit
ba0ae4818a
7 changed files with 32 additions and 8 deletions
|
|
@ -3866,7 +3866,7 @@ ARDOUR_UI::plugin_scan_dialog (std::string type, std::string plugin, bool can_ca
|
|||
timeout_button->show();
|
||||
|
||||
scan_pbar = manage(new ProgressBar());
|
||||
//scan_pbar->set_size_request(300,-1);
|
||||
scan_pbar->set_orientation(Gtk::PROGRESS_RIGHT_TO_LEFT);
|
||||
scan_pbar->set_text(_("Scan Timeout"));
|
||||
scan_pbar->show();
|
||||
|
||||
|
|
|
|||
|
|
@ -669,7 +669,9 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
void gui_idle_handler ();
|
||||
|
||||
void cancel_plugin_scan ();
|
||||
void cancel_plugin_timeout ();
|
||||
void plugin_scan_dialog (std::string type, std::string plugin, bool);
|
||||
void plugin_scan_timeout (int);
|
||||
|
||||
void session_format_mismatch (std::string, std::string);
|
||||
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ namespace ARDOUR {
|
|||
|
||||
extern LIBARDOUR_API PBD::Signal1<void,std::string> BootMessage;
|
||||
extern LIBARDOUR_API PBD::Signal3<void,std::string,std::string,bool> PluginScanMessage;
|
||||
extern LIBARDOUR_API PBD::Signal1<void,int> PluginScanTimeout;
|
||||
extern LIBARDOUR_API PBD::Signal0<void> GUIIdle;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -53,13 +53,15 @@ class LIBARDOUR_API PluginManager : public boost::noncopyable {
|
|||
|
||||
void refresh (bool cache_only = false);
|
||||
void cancel_plugin_scan();
|
||||
void cancel_plugin_timeout();
|
||||
void clear_vst_cache ();
|
||||
void clear_vst_blacklist ();
|
||||
|
||||
const std::string get_default_windows_vst_path() const { return windows_vst_path; }
|
||||
const std::string get_default_lxvst_path() const { return lxvst_path; }
|
||||
|
||||
bool cancelled () { return cancel_scan; }
|
||||
bool cancelled () { return _cancel_scan; }
|
||||
bool no_timeout () { return _cancel_timeout; }
|
||||
|
||||
enum PluginStatusType {
|
||||
Normal = 0,
|
||||
|
|
@ -112,7 +114,8 @@ class LIBARDOUR_API PluginManager : public boost::noncopyable {
|
|||
std::string windows_vst_path;
|
||||
std::string lxvst_path;
|
||||
|
||||
bool cancel_scan;
|
||||
bool _cancel_scan;
|
||||
bool _cancel_timeout;
|
||||
|
||||
void ladspa_refresh ();
|
||||
void windows_vst_refresh (bool cache_only = false);
|
||||
|
|
|
|||
|
|
@ -126,6 +126,7 @@ mix_buffers_no_gain_t ARDOUR::mix_buffers_no_gain = 0;
|
|||
|
||||
PBD::Signal1<void,std::string> ARDOUR::BootMessage;
|
||||
PBD::Signal3<void,std::string,std::string,bool> ARDOUR::PluginScanMessage;
|
||||
PBD::Signal1<void,int> ARDOUR::PluginScanTimeout;
|
||||
PBD::Signal0<void> ARDOUR::GUIIdle;
|
||||
|
||||
namespace ARDOUR {
|
||||
|
|
|
|||
|
|
@ -111,7 +111,8 @@ PluginManager::PluginManager ()
|
|||
, _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;
|
||||
|
|
@ -192,7 +193,7 @@ void
|
|||
PluginManager::refresh (bool cache_only)
|
||||
{
|
||||
DEBUG_TRACE (DEBUG::PluginManager, "PluginManager::refresh\n");
|
||||
cancel_scan = false;
|
||||
_cancel_scan = false;
|
||||
|
||||
BootMessage (_("Scanning LADSPA Plugins"));
|
||||
ladspa_refresh ();
|
||||
|
|
@ -222,13 +223,19 @@ PluginManager::refresh (bool cache_only)
|
|||
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
|
||||
|
|
@ -674,6 +681,7 @@ PluginManager::windows_vst_discover (string path, bool cache_only)
|
|||
{
|
||||
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);
|
||||
|
||||
|
|
@ -797,6 +805,7 @@ PluginManager::lxvst_discover (string path, bool cache_only)
|
|||
{
|
||||
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);
|
||||
|
||||
|
|
|
|||
|
|
@ -916,7 +916,15 @@ vstfx_get_info (const char* dllpath, enum ARDOUR::PluginType type, enum VSTScanM
|
|||
return infos;
|
||||
} else {
|
||||
int timeout = PLUGIN_SCAN_TIMEOUT;
|
||||
while (scanner.is_running() && --timeout) {
|
||||
bool no_timeout = (timeout <= 0);
|
||||
ARDOUR::PluginScanTimeout(timeout);
|
||||
while (scanner.is_running() && (no_timeout || timeout > 0)) {
|
||||
if (!no_timeout && !ARDOUR::PluginManager::instance().no_timeout()) {
|
||||
if (timeout%5 == 0) {
|
||||
ARDOUR::PluginScanTimeout(timeout);
|
||||
}
|
||||
--timeout;
|
||||
}
|
||||
ARDOUR::GUIIdle();
|
||||
Glib::usleep (100000);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue