diff options
author | Robin Gareus <robin@gareus.org> | 2016-04-22 21:10:04 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-04-22 21:10:39 +0200 |
commit | 00f48c3d633190256e381ec930a49f392184595f (patch) | |
tree | a7b5b9ca846bee3dab8b4dbf588b0ba14b6b475d /libs/ardour/audio_unit.cc | |
parent | 90babfaca3a75d5d3eb1e9e1de7c66302e8067aa (diff) |
invalidate AU cache on re-scan
Diffstat (limited to 'libs/ardour/audio_unit.cc')
-rw-r--r-- | libs/ardour/audio_unit.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc index 1862844cd9..e28d892053 100644 --- a/libs/ardour/audio_unit.cc +++ b/libs/ardour/audio_unit.cc @@ -2698,6 +2698,8 @@ AUPluginInfo::discover (bool scan_only) if (!Glib::file_test (au_cache_path(), Glib::FILE_TEST_EXISTS)) { ARDOUR::BootMessage (_("Discovering AudioUnit plugins (could take some time ...)")); + // flush RAM cache -- after clear_cache() + cached_info.clear(); } // create crash log file au_start_crashlog (); @@ -3073,6 +3075,17 @@ AUPluginInfo::cached_io_configuration (const std::string& unique_id, } void +AUPluginInfo::clear_cache () +{ + const string& fn = au_cache_path(); + if (Glib::file_test (fn, Glib::FILE_TEST_EXISTS)) { + ::g_unlink(fn.c_str()); + } + // keep cached_info in RAM until restart or re-scan + cached_info.clear(); +} + +void AUPluginInfo::add_cached_info (const std::string& id, AUPluginCachedInfo& cinfo) { cached_info[id] = cinfo; |