1 |
/* |
/* |
2 |
Copyright (C) 2010 Christian Schoenebeck |
Copyright (C) 2010 - 2012 Christian Schoenebeck |
3 |
*/ |
*/ |
4 |
|
|
5 |
#include "LadspaEffect.h" |
#include "LadspaEffect.h" |
7 |
#include "../common/global_private.h" |
#include "../common/global_private.h" |
8 |
#include "../common/File.h" |
#include "../common/File.h" |
9 |
#include "../drivers/audio/AudioOutputDevice.h" |
#include "../drivers/audio/AudioOutputDevice.h" |
10 |
#include <math.h> |
#include <cmath> |
11 |
|
#include <sstream> |
12 |
|
|
13 |
namespace LinuxSampler { |
namespace LinuxSampler { |
14 |
|
|
376 |
std::vector<EffectInfo*> v; // will be filled in callback function _foundLadspaDll() |
std::vector<EffectInfo*> v; // will be filled in callback function _foundLadspaDll() |
377 |
|
|
378 |
char* pcLadspaPath = getenv("LADSPA_PATH"); |
char* pcLadspaPath = getenv("LADSPA_PATH"); |
379 |
String ladspaDir = (pcLadspaPath) ? pcLadspaPath : defaultLadspaDir(); |
String ladspaDir = pcLadspaPath ? pcLadspaPath : defaultLadspaDir(); |
380 |
|
|
381 |
try { |
try { |
382 |
DynamicLibrariesSearch( |
std::istringstream ss(ladspaDir); |
383 |
ladspaDir.c_str(), "ladspa_descriptor", _foundLadspaDll, &v |
std::string path; |
384 |
); |
while (std::getline(ss, path, File::PathSeparator)) { |
385 |
|
if (!path.empty()) { |
386 |
|
DynamicLibrariesSearch(path.c_str(), "ladspa_descriptor", _foundLadspaDll, &v); |
387 |
|
} |
388 |
|
} |
389 |
} catch (Exception e) { |
} catch (Exception e) { |
390 |
std::cerr << "Could not scan LADSPA effects: " << e.Message() |
std::cerr << "Could not scan LADSPA effects: " << e.Message() |
391 |
<< std::endl << std::flush; |
<< std::endl << std::flush; |