mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 03:36:32 +01:00
AU scan: only update config when discovering new plugins
When reading cached info only, crash protection is not needed.
This commit is contained in:
parent
56934284e7
commit
357095b920
1 changed files with 10 additions and 6 deletions
|
|
@ -964,17 +964,21 @@ PluginManager::au_refresh (bool cache_only)
|
||||||
{
|
{
|
||||||
DEBUG_TRACE (DEBUG::PluginManager, "AU: refresh\n");
|
DEBUG_TRACE (DEBUG::PluginManager, "AU: refresh\n");
|
||||||
|
|
||||||
// disable automatic discovery in case we crash
|
|
||||||
bool discover_at_start = Config->get_discover_audio_units ();
|
bool discover_at_start = Config->get_discover_audio_units ();
|
||||||
Config->set_discover_audio_units (false);
|
if (discover_at_start) {
|
||||||
Config->save_state();
|
/* disable automatic discovery in case scanning crashes */
|
||||||
|
Config->set_discover_audio_units (false);
|
||||||
|
Config->save_state();
|
||||||
|
}
|
||||||
|
|
||||||
delete _au_plugin_info;
|
delete _au_plugin_info;
|
||||||
_au_plugin_info = AUPluginInfo::discover(cache_only && !discover_at_start);
|
_au_plugin_info = AUPluginInfo::discover(cache_only && !discover_at_start);
|
||||||
|
|
||||||
// successful scan re-enabled automatic discovery if it was set
|
if (discover_at_start) {
|
||||||
Config->set_discover_audio_units (discover_at_start);
|
/* successful scan re-enabled automatic discovery if it was set */
|
||||||
Config->save_state();
|
Config->set_discover_audio_units (discover_at_start);
|
||||||
|
Config->save_state();
|
||||||
|
}
|
||||||
|
|
||||||
for (PluginInfoList::iterator i = _au_plugin_info->begin(); i != _au_plugin_info->end(); ++i) {
|
for (PluginInfoList::iterator i = _au_plugin_info->begin(); i != _au_plugin_info->end(); ++i) {
|
||||||
set_tags ((*i)->type, (*i)->unique_id, (*i)->category, (*i)->name, FromPlug);
|
set_tags ((*i)->type, (*i)->unique_id, (*i)->category, (*i)->name, FromPlug);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue