/[svn]/linuxsampler/trunk/src/effects/LadspaEffect.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/effects/LadspaEffect.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2136 by schoenebeck, Thu Sep 30 20:00:43 2010 UTC revision 2137 by schoenebeck, Mon Oct 4 12:20:23 2010 UTC
# Line 5  Line 5 
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    
# Line 346  static void _foundLadspaDll(String filen Line 347  static void _foundLadspaDll(String filen
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() {

Legend:
Removed from v.2136  
changed lines
  Added in v.2137

  ViewVC Help
Powered by ViewVC