VST3: update scanner API, distinguish new and updated plugins
This commit is contained in:
parent
fce374fd41
commit
f28ea675ee
|
@ -72,7 +72,7 @@ LIBARDOUR_API extern std::string
|
|||
vst3_cache_file (std::string const& module_path);
|
||||
|
||||
LIBARDOUR_API extern std::string
|
||||
vst3_valid_cache_file (std::string const& module_path, bool verbose = false);
|
||||
vst3_valid_cache_file (std::string const& module_path, bool verbose = false, bool* is_new = NULL);
|
||||
|
||||
LIBARDOUR_API extern bool
|
||||
vst3_scan_and_cache (std::string const& module_path, std::string const& bundle_path, boost::function<void (std::string const&, VST3Info const&)> cb, bool verbose = false);
|
||||
|
|
|
@ -373,13 +373,20 @@ ARDOUR::vst3_cache_file (std::string const& module_path)
|
|||
}
|
||||
|
||||
string
|
||||
ARDOUR::vst3_valid_cache_file (std::string const& module_path, bool verbose)
|
||||
ARDOUR::vst3_valid_cache_file (std::string const& module_path, bool verbose, bool* is_new)
|
||||
{
|
||||
string const cache_file = ARDOUR::vst3_cache_file (module_path);
|
||||
if (!Glib::file_test (cache_file, Glib::FileTest (Glib::FILE_TEST_EXISTS | Glib::FILE_TEST_IS_REGULAR))) {
|
||||
if (is_new) {
|
||||
*is_new = true;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
if (is_new) {
|
||||
*is_new = false;
|
||||
}
|
||||
|
||||
if (verbose) {
|
||||
PBD::info << "Found cache file: '" << cache_file <<"'" << endmsg;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue