| 312 | } |
| 313 | |
| 314 | FilePaths LadspaEffectsModule::GetSearchPaths(PluginManagerInterface& pluginManager) |
| 315 | { |
| 316 | FilePaths pathList; |
| 317 | wxString pathVar; |
| 318 | |
| 319 | // Check for the LADSPA_PATH environment variable |
| 320 | pathVar = wxString::FromUTF8(getenv("LADSPA_PATH")); |
| 321 | if (!pathVar.empty()) |
| 322 | { |
| 323 | wxStringTokenizer tok(pathVar, wxPATH_SEP); |
| 324 | while (tok.HasMoreTokens()) |
| 325 | { |
| 326 | pathList.push_back(tok.GetNextToken()); |
| 327 | } |
| 328 | } |
| 329 | |
| 330 | #if defined(__WXMAC__) |
| 331 | #define LADSPAPATH wxT("/Library/Audio/Plug-Ins/LADSPA") |
| 332 | |
| 333 | // Look in ~/Library/Audio/Plug-Ins/LADSPA and /Library/Audio/Plug-Ins/LADSPA |
| 334 | pathList.push_back(wxGetHomeDir() + wxFILE_SEP_PATH + LADSPAPATH); |
| 335 | pathList.push_back(LADSPAPATH); |
| 336 | |
| 337 | #elif defined(__WXMSW__) |
| 338 | |
| 339 | // No special paths...probably should look in %CommonProgramFiles%\LADSPA |
| 340 | |
| 341 | #else |
| 342 | |
| 343 | pathList.push_back(wxGetHomeDir() + wxFILE_SEP_PATH + wxT(".ladspa")); |
| 344 | #if defined(__LP64__) |
| 345 | pathList.push_back(wxT("/usr/local/lib64/ladspa")); |
| 346 | pathList.push_back(wxT("/usr/lib64/ladspa")); |
| 347 | #endif |
| 348 | pathList.push_back(wxT("/usr/local/lib/ladspa")); |
| 349 | pathList.push_back(wxT("/usr/lib/ladspa")); |
| 350 | pathList.push_back(wxT(LIBDIR) wxT("/ladspa")); |
| 351 | |
| 352 | #endif |
| 353 | |
| 354 | { |
| 355 | auto customPaths = pluginManager.ReadCustomPaths(*this); |
| 356 | std::copy(customPaths.begin(), customPaths.end(), std::back_inserter(pathList)); |
| 357 | } |
| 358 | |
| 359 | return pathList; |
| 360 | } |