diff plugin/FeatureExtractionPluginFactory.cpp @ 83:b2067aff8cd6

* Fix crash in spectrogram layer when replacing model * Change sample player's sample path to a single sample directory. This makes it immune to OS path separator differences, and ensures it can reject configure calls that try to set a nonexistent directory. Reloading play parameters (e.g. sample program) should now work. * some win32 fixes.
author Chris Cannam
date Wed, 26 Apr 2006 16:00:13 +0000
parents bf42d8d63885
children c30728d5625c
line wrap: on
line diff
--- a/plugin/FeatureExtractionPluginFactory.cpp	Wed Apr 26 14:09:55 2006 +0000
+++ b/plugin/FeatureExtractionPluginFactory.cpp	Wed Apr 26 16:00:13 2006 +0000
@@ -71,6 +71,15 @@
                 envPath.replace(f, 5, home);
             }
         }
+#ifdef Q_WS_WIN32
+        char *cpfiles = getenv("ProgramFiles");
+        if (!cpfiles) cpfiles = "C:\\Program Files";
+        std::string pfiles(cpfiles);
+        int f;
+        while ((f = envPath.find("%ProgramFiles%")) >= 0 && f < envPath.length()) {
+            envPath.replace(f, 14, pfiles);
+        }
+#endif
     }
 
     std::cerr << "VAMP path is: \"" << envPath << "\"" << std::endl;