diff runner/main.cpp @ 116:1c0799754670

Normalise option (yet to be tested)
author Chris Cannam
date Fri, 03 Oct 2014 15:42:55 +0100
parents 0c2d8c945bbf
children 5be4995f4029
line wrap: on
line diff
--- a/runner/main.cpp	Fri Oct 03 15:07:19 2014 +0100
+++ b/runner/main.cpp	Fri Oct 03 15:42:55 2014 +0100
@@ -245,6 +245,8 @@
     cerr << "                      for all supported audio files and take all of those as" << endl;
     cerr << "                      input instead." << endl;
     cerr << endl;
+    cerr << "  -n, --normalise     Normalise input audio files to signal absolute max = 1.f." << endl;
+    cerr << endl;
     cerr << "  -f, --force         Continue with subsequent files following an error." << endl;
     cerr << endl;
     cerr << "Housekeeping options:" << endl;
@@ -394,6 +396,7 @@
     bool force = false;
     bool multiplex = false;
     bool recursive = false;
+    bool normalise = false;
     bool list = false;
     bool summaryOnly = false;
     QString skeletonFor = "";
@@ -521,6 +524,9 @@
         } else if (arg == "-r" || arg == "--recursive") {
             recursive = true;
             continue;
+        } else if (arg == "-n" || arg == "--normalise") {
+            normalise = true;
+            continue;
         } else if (arg == "-f" || arg == "--force") {
             force = true;
             continue;
@@ -607,6 +613,8 @@
 
     FeatureExtractionManager manager;
 
+    manager.setNormalise(normalise);
+
     if (!requestedSummaryTypes.empty()) {
         if (!manager.setSummaryTypes(requestedSummaryTypes,
                                      boundaries)) {
@@ -617,7 +625,7 @@
     }
 
     manager.setSummariesOnly(summaryOnly);
-    
+
     vector<FeatureWriter *> writers;
 
     for (set<string>::const_iterator i = requestedWriterTags.begin();