5 |
#include "LadspaEffect.h" |
#include "LadspaEffect.h" |
6 |
#include "../common/DynamicLibraries.h" |
#include "../common/DynamicLibraries.h" |
7 |
#include "../common/global_private.h" |
#include "../common/global_private.h" |
8 |
|
#include "../common/File.h" |
9 |
#include "../drivers/audio/AudioOutputDevice.h" |
#include "../drivers/audio/AudioOutputDevice.h" |
10 |
#include <math.h> |
#include <math.h> |
11 |
|
|
347 |
|
|
348 |
static String defaultLadspaDir() { |
static String defaultLadspaDir() { |
349 |
#if defined(WIN32) |
#if defined(WIN32) |
350 |
//FIXME: hmm... who knows what the common default LADSPA path on Windows is? |
const String sysDir = |
351 |
const String sysDir = getenv("PROGRAMFILES"); |
getenv("PROGRAMFILES") ? getenv("PROGRAMFILES") : "C:\\Program Files"; |
352 |
return sysDir + "\ladspa"; |
const String searchDirs[] = { |
353 |
|
sysDir + "\\ladspa", //FIXME: hmm... who knows what the common default LADSPA path on Windows is? |
354 |
|
sysDir + "\\Audacity\\Plug-Ins" |
355 |
|
}; |
356 |
#else |
#else |
357 |
return "/usr/lib/ladspa"; |
const String searchDirs[] = { |
358 |
|
"/usr/lib/ladspa", |
359 |
|
"/usr/local/lib/ladspa" |
360 |
|
}; |
361 |
#endif |
#endif |
362 |
|
// check if one of the suggested directories exists |
363 |
|
for (int i = 0; i < sizeof(searchDirs) / sizeof(String); i++) { |
364 |
|
File f(searchDirs[i]); |
365 |
|
if (f.Exist() && f.IsDirectory()) |
366 |
|
return searchDirs[i]; |
367 |
|
} |
368 |
|
// No directory of the list exists? Whatever, return the 1st one of the list. |
369 |
|
return searchDirs[0]; |
370 |
} |
} |
371 |
|
|
372 |
std::vector<EffectInfo*> LadspaEffect::AvailableEffects() { |
std::vector<EffectInfo*> LadspaEffect::AvailableEffects() { |