Mercurial > hg > svcore
comparison plugin/DSSIPluginFactory.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 | 665342c6ec57 |
children | e08cb0158e81 |
comparison
equal
deleted
inserted
replaced
185:d5052b5fea9c | 186:06ad01f3e553 |
---|---|
202 | 202 |
203 char *cpath = getenv("DSSI_PATH"); | 203 char *cpath = getenv("DSSI_PATH"); |
204 if (cpath) path = cpath; | 204 if (cpath) path = cpath; |
205 | 205 |
206 if (path == "") { | 206 if (path == "") { |
207 path = "/usr/local/lib/dssi:/usr/lib/dssi"; | 207 |
208 path = DEFAULT_DSSI_PATH; | |
209 | |
208 char *home = getenv("HOME"); | 210 char *home = getenv("HOME"); |
209 if (home) { | 211 if (home) { |
210 path = std::string(home) + "/dssi:" + | 212 std::string::size_type f; |
211 std::string(home) + "/.dssi:" + path; | 213 while ((f = path.find("$HOME")) != std::string::npos && |
214 f < path.length()) { | |
215 path.replace(f, 5, home); | |
216 } | |
212 } | 217 } |
218 | |
219 #ifdef _WIN32 | |
220 home = getenv("ProgramFiles"); | |
221 if (!home) home = "C:\\Program Files"; | |
222 std::string::size_type f; | |
223 while ((f = path.find("%ProgramFiles%")) != std::string::npos && | |
224 f < path.length()) { | |
225 path.replace(f, 14, pfiles); | |
226 } | |
227 #endif | |
213 } | 228 } |
214 | 229 |
215 std::string::size_type index = 0, newindex = 0; | 230 std::string::size_type index = 0, newindex = 0; |
216 | 231 |
217 while ((newindex = path.find(':', index)) < path.size()) { | 232 while ((newindex = path.find(':', index)) < path.size()) { |