diff options
author | John Emmas <johne53@tiscali.co.uk> | 2014-03-10 14:33:15 +0000 |
---|---|---|
committer | John Emmas <johne53@tiscali.co.uk> | 2014-03-10 16:24:06 +0000 |
commit | ff053653e1110eb6082a8f68972cedd0afeeb989 (patch) | |
tree | e94e916d93c303129e14d7998499f9aa154b33b6 /libs/ardour/search_paths.cc | |
parent | d1fd112bdf9fe445604fdd4f5bc6ad7ff64d5594 (diff) |
Transfer 'ladspa_search_path()' into 'libs/ardour/search_paths.cc'
Diffstat (limited to 'libs/ardour/search_paths.cc')
-rw-r--r-- | libs/ardour/search_paths.cc | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/libs/ardour/search_paths.cc b/libs/ardour/search_paths.cc index 0e268e03a1..45a2e13974 100644 --- a/libs/ardour/search_paths.cc +++ b/libs/ardour/search_paths.cc @@ -20,6 +20,8 @@ #include <glibmm/miscutils.h> +#include "pbd/pathexpand.h" + #include "ardour/search_paths.h" #include "ardour/directory_names.h" #include "ardour/filesystem_paths.h" @@ -28,6 +30,7 @@ namespace { const char * const backend_env_variable_name = "ARDOUR_BACKEND_PATH"; const char * const surfaces_env_variable_name = "ARDOUR_SURFACES_PATH"; const char * const export_env_variable_name = "ARDOUR_EXPORT_FORMATS_PATH"; + const char * const ladspa_env_variable_name = "LADSPA_PATH"; } // anonymous using namespace PBD; @@ -72,4 +75,29 @@ export_formats_search_path () return spath; } +Searchpath +ladspa_search_path () +{ + Searchpath spath_env (Glib::getenv(ladspa_env_variable_name)); + + Searchpath spath (user_config_directory ()); + + spath += ardour_dll_directory (); + spath.add_subdirectory_to_paths (ladspa_dir_name); + +#ifndef PLATFORM_WINDOWS + spath.push_back ("/usr/local/lib64/ladspa"); + spath.push_back ("/usr/local/lib/ladspa"); + spath.push_back ("/usr/lib64/ladspa"); + spath.push_back ("/usr/lib/ladspa"); +#endif + +#ifdef __APPLE__ + spath.push_back (path_expand ("~/Library/Audio/Plug-Ins/LADSPA")); + spath.push_back ("/Library/Audio/Plug-Ins/LADSPA"); +#endif + + return spath_env + spath; +} + } // namespace ARDOUR |