diff options
author | Robin Gareus <robin@gareus.org> | 2015-07-16 16:32:38 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-07-16 16:54:57 +0200 |
commit | 93b90396d28fb34f17bf719b6ad41b719d653b61 (patch) | |
tree | 4f75ed2898edcdb68014df39a3c2ebe384ae1d6f /libs/ardour/plugin_manager.cc | |
parent | a95b6cfd924e90452bcb22c9ac1a3aa111708f47 (diff) |
rework AU scanning/discovery
Scan-only: “Iterate over all plugins. skip the ones where there's no
io-cache entry
Discover: cache new plugins info, update cache if needed.
Diffstat (limited to 'libs/ardour/plugin_manager.cc')
-rw-r--r-- | libs/ardour/plugin_manager.cc | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/libs/ardour/plugin_manager.cc b/libs/ardour/plugin_manager.cc index 458f7e1547..2b84c22fe7 100644 --- a/libs/ardour/plugin_manager.cc +++ b/libs/ardour/plugin_manager.cc @@ -639,31 +639,17 @@ void PluginManager::au_refresh (bool cache_only) { DEBUG_TRACE (DEBUG::PluginManager, "AU: refresh\n"); - if (cache_only && !Config->get_discover_audio_units ()) { - return; - } - delete _au_plugin_info; - _au_plugin_info = AUPluginInfo::discover(); - // disable automatic scan in case we crash + // disable automatic discovery in case we crash + bool discover_at_start = Config->get_discover_audio_units (); Config->set_discover_audio_units (false); Config->save_state(); - /* note: AU require a CAComponentDescription pointer provided by the OS. - * Ardour only caches port and i/o config. It can't just 'scan' without - * 'discovering' (like we do for VST). - * - * So in case discovery fails, we assume the worst: the Description - * is broken (malicious plugins) and even a simple 'scan' would always - * crash ardour on startup. Hence we disable Auto-Scan on start. - * - * If the crash happens at any later time (description is available), - * Ardour will blacklist the plugin in question -- unless - * the crash happens during realtime-run. - */ + delete _au_plugin_info; + _au_plugin_info = AUPluginInfo::discover(cache_only && !discover_at_start); - // successful scan re-enabled automatic discovery - Config->set_discover_audio_units (true); + // successful scan re-enabled automatic discovery if it was set + Config->set_discover_audio_units (discover_at_start); Config->save_state(); } |