MCPcopy Create free account
hub / github.com/audacity/audacity / DiscoverProviders

Method DiscoverProviders

libraries/lib-module-manager/ModuleManager.cpp:460–495  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

458}
459
460bool 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
497void ModuleManager::InitializeBuiltins()
498{

Callers 2

PluginHostMethod · 0.80
InitializeMethod · 0.80

Calls 2

FindFilesInPathListFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected