Mercurial > hg > svcore
comparison plugin/LADSPAPluginFactory.cpp @ 186:06ad01f3e553
* Add system-specific LADSPA and DSSI plugin paths (for OS/X and Windows)
* Add ability to open more than one audio file at once from the command line
* Add plugin input source selection (with some caveats)
* Show name of file being decoded in Ogg/mp3 decode progress dialog
author | Chris Cannam |
---|---|
date | Thu, 12 Oct 2006 14:56:28 +0000 |
parents | 702fc936e6a6 |
children | 4882563bd2b3 |
comparison
equal
deleted
inserted
replaced
185:d5052b5fea9c | 186:06ad01f3e553 |
---|---|
526 | 526 |
527 char *cpath = getenv("LADSPA_PATH"); | 527 char *cpath = getenv("LADSPA_PATH"); |
528 if (cpath) path = cpath; | 528 if (cpath) path = cpath; |
529 | 529 |
530 if (path == "") { | 530 if (path == "") { |
531 path = "/usr/local/lib/ladspa:/usr/lib/ladspa"; | 531 |
532 path = DEFAULT_LADSPA_PATH; | |
533 | |
532 char *home = getenv("HOME"); | 534 char *home = getenv("HOME"); |
533 if (home) path = std::string(home) + "/.ladspa:" + path; | 535 if (home) { |
536 std::string::size_type f; | |
537 while ((f = path.find("$HOME")) != std::string::npos && | |
538 f < path.length()) { | |
539 path.replace(f, 5, home); | |
540 } | |
541 } | |
542 | |
543 #ifdef _WIN32 | |
544 home = getenv("ProgramFiles"); | |
545 if (!home) home = "C:\\Program Files"; | |
546 std::string::size_type f; | |
547 while ((f = path.find("%ProgramFiles%")) != std::string::npos && | |
548 f < path.length()) { | |
549 path.replace(f, 14, pfiles); | |
550 } | |
551 #endif | |
534 } | 552 } |
535 | 553 |
536 std::string::size_type index = 0, newindex = 0; | 554 std::string::size_type index = 0, newindex = 0; |
537 | 555 |
538 while ((newindex = path.find(':', index)) < path.size()) { | 556 while ((newindex = path.find(':', index)) < path.size()) { |