X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fpanner_manager.cc;h=c6b73b40775fbdac0ce8d58bd9ed723d600b0573;hb=cf52d6e4b40111eb04b244ec054055a4ec15dbe0;hp=b14c7c79cf532efcf4a969e9495c327f4ef0ac47;hpb=5399425f534e2d96d07cf29f427bfa0f39d904b7;p=ardour.git diff --git a/libs/ardour/panner_manager.cc b/libs/ardour/panner_manager.cc index b14c7c79cf..c6b73b4077 100644 --- a/libs/ardour/panner_manager.cc +++ b/libs/ardour/panner_manager.cc @@ -24,7 +24,7 @@ #include "pbd/error.h" #include "pbd/compose.h" -#include "pbd/pathscanner.h" +#include "pbd/file_utils.h" #include "pbd/stl_delete.h" #include "ardour/debug.h" @@ -32,7 +32,7 @@ #include "ardour/search_paths.h" -#include "i18n.h" +#include "pbd/i18n.h" using namespace std; using namespace ARDOUR; @@ -90,19 +90,15 @@ static bool panner_filter (const string& str, void */*arg*/) void PannerManager::discover_panners () { - PathScanner scanner; - std::vector *panner_modules; - std::string search_path = panner_search_path().to_string(); + std::vector panner_modules; - DEBUG_TRACE (DEBUG::Panning, string_compose (_("looking for panners in %1\n"), search_path)); + DEBUG_TRACE (DEBUG::Panning, string_compose (_("looking for panners in %1\n"), panner_search_path().to_string())); - panner_modules = scanner (search_path, panner_filter, 0, false, true, 1, true); + find_files_matching_filter (panner_modules, panner_search_path(), panner_filter, 0, false, true, true); - for (vector::iterator i = panner_modules->begin(); i != panner_modules->end(); ++i) { - panner_discover (**i); + for (vector::iterator i = panner_modules.begin(); i != panner_modules.end(); ++i) { + panner_discover (*i); } - - vector_delete (panner_modules); } int @@ -123,6 +119,8 @@ PannerManager::panner_discover (string path) if (i == panner_info.end()) { panner_info.push_back (pinfo); DEBUG_TRACE (DEBUG::Panning, string_compose(_("Panner discovered: \"%1\" in %2\n"), pinfo->descriptor.name, path)); + } else { + delete pinfo; } }