X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=libs%2Fardour%2Faudio_unit.cc;h=add2407f841cfc87f9602aed7f4911c934fc3e64;hb=9254e80c396265f484adb3b7bf5f0b502d096107;hp=1a24977399e504d8c4a1ca8522b0c7f723d49f7f;hpb=fb313fb1741a04f270fff3703967df572ac4fc45;p=ardour.git diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc index 1a24977399..add2407f84 100644 --- a/libs/ardour/audio_unit.cc +++ b/libs/ardour/audio_unit.cc @@ -28,7 +28,7 @@ #include "pbd/xml++.h" #include "pbd/convert.h" #include "pbd/whitespace.h" -#include "pbd/pathscanner.h" +#include "pbd/file_utils.h" #include "pbd/locale_guard.h" #include @@ -2049,20 +2049,19 @@ AUPlugin::current_preset() const void AUPlugin::find_presets () { - vector* preset_files; - PathScanner scanner; + vector preset_files; user_preset_map.clear (); - preset_files = scanner (preset_search_path, au_preset_filter, this, true, true, -1, true); + find_files_matching_filter (preset_files, preset_search_path, au_preset_filter, this, true, true, true); - if (!preset_files) { + if (preset_files.empty()) { return; } - for (vector::iterator x = preset_files->begin(); x != preset_files->end(); ++x) { + for (vector::iterator x = preset_files.begin(); x != preset_files.end(); ++x) { - string path = *(*x); + string path = *x; string preset_name; /* make an initial guess at the preset name using the path */ @@ -2079,11 +2078,8 @@ AUPlugin::find_presets () user_preset_map[preset_name] = path; } - delete *x; } - delete preset_files; - /* now fill the vector with the names we have */ for (UserPresetMap::iterator i = user_preset_map.begin(); i != user_preset_map.end(); ++i) { @@ -2278,6 +2274,7 @@ AUPluginInfo::discover_by_description (PluginInfoList& plugs, CAComponentDescrip } AUPluginInfo::get_names (temp, info->name, info->creator); + ARDOUR::PluginScanMessage(_("AU"), info->name, false); info->type = ARDOUR::AudioUnit; info->unique_id = stringify_descriptor (*info->descriptor);