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

Method getModulePaths

libraries/lib-vst3/module_linux.cpp:272–302  ·  view source on GitHub ↗

------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

270
271//------------------------------------------------------------------------
272Module::PathList Module::getModulePaths ()
273{
274 /* VST3 component locations on linux :
275 * User privately installed : $HOME/.vst3/
276 * Distribution installed : /usr/lib/vst3/
277 * Locally installed : /usr/local/lib/vst3/
278 * Application : /$APPFOLDER/vst3/
279 */
280
281 const auto systemPaths = {"/usr/lib/vst3/", "/usr/local/lib/vst3/"};
282
283 PathList list;
284 if (auto homeDir = getenv ("HOME"))
285 {
286 filesystem::path homePath (homeDir);
287 homePath /= ".vst3";
288 findModules (homePath.generic_string (), list);
289 }
290 for (auto path : systemPaths)
291 findModules (path, list);
292
293 // application level
294 auto appPath = getApplicationPath ();
295 if (appPath)
296 {
297 *appPath /= "vst3";
298 findModules (appPath->generic_string (), list);
299 }
300
301 return list;
302}
303
304//------------------------------------------------------------------------
305Module::SnapshotList Module::getSnapshots (const std::string& modulePath)

Callers

nothing calls this directly

Calls 2

getApplicationPathFunction · 0.85
findModulesFunction · 0.70

Tested by

no test coverage detected