| 458 | } |
| 459 | |
| 460 | bool ModuleManager::DiscoverProviders() |
| 461 | { |
| 462 | InitializeBuiltins(); |
| 463 | |
| 464 | // The commented out code loads modules whether or not they are enabled. |
| 465 | // none of our modules is a 'provider' of effects, so this code commented out. |
| 466 | #if 0 |
| 467 | FilePaths provList; |
| 468 | FilePaths pathList; |
| 469 | |
| 470 | // Code from LoadLadspa that might be useful in load modules. |
| 471 | wxString pathVar = wxString::FromUTF8(getenv("AUDACITY_MODULES_PATH")); |
| 472 | |
| 473 | if (!pathVar.empty()) |
| 474 | { |
| 475 | FileNames::AddMultiPathsToPathList(pathVar, pathList); |
| 476 | } |
| 477 | else |
| 478 | { |
| 479 | FileNames::AddUniquePathToPathList(FileNames::ModulesDir(), pathList); |
| 480 | } |
| 481 | |
| 482 | #if defined(__WXMSW__) |
| 483 | FileNames::FindFilesInPathList(wxT("*.dll"), pathList, provList); |
| 484 | #elif defined(__WXMAC__) |
| 485 | FileNames::FindFilesInPathList(wxT("*.dylib"), pathList, provList); |
| 486 | #else |
| 487 | FileNames::FindFilesInPathList(wxT("*.so"), pathList, provList); |
| 488 | #endif |
| 489 | |
| 490 | for ( const auto &path : provList ) |
| 491 | LoadModule(path); |
| 492 | #endif |
| 493 | |
| 494 | return true; |
| 495 | } |
| 496 | |
| 497 | void ModuleManager::InitializeBuiltins() |
| 498 | { |
no test coverage detected