diff transform/FileFeatureWriter.cpp @ 659:cd1fa6387cb9

* Fix csv-one-file option
author Chris Cannam
date Mon, 18 Oct 2010 14:14:26 +0100
parents 686fc1703a33
children b4a8d8221eaf
line wrap: on
line diff
--- a/transform/FileFeatureWriter.cpp	Mon Oct 18 12:42:42 2010 +0100
+++ b/transform/FileFeatureWriter.cpp	Mon Oct 18 14:14:26 2010 +0100
@@ -90,7 +90,11 @@
     if (m_support & SupportOneFileTotal) {
         if (m_support & ~SupportOneFileTotal) { // not only option
             p.name = "one-file";
-            p.description = "Write all transform results for all input files into the single named output file.";
+            if (m_support & SupportOneFilePerTrack) {
+                p.description = "Write all transform results for all input files into the single named output file.  (The default is to create one output file per input audio file, and write all transform results for that input into it.)";
+            } else {
+                p.description = "Write all transform results for all input files into the single named output file.  (The default is to create a separate output file for each combination of input audio file and transform.)";
+            }                
             p.hasArg = true;
             pl.push_back(p);
         }
@@ -132,11 +136,16 @@
         } else if (i->first == "one-file") {
             if (m_support & SupportOneFileTotal) {
                 if (m_support & ~SupportOneFileTotal) { // not only option
-                    if (m_manyFiles) {
-                        cerr << "FileFeatureWriter::setParameters: WARNING: Both many-files and one-file parameters provided, ignoring one-file" << endl;
-                    } else {
+                    // No, we cannot do this test because m_manyFiles
+                    // may be on by default (for any FileFeatureWriter
+                    // that supports OneFilePerTrackTransform but not
+                    // OneFilePerTrack), so we need to be able to
+                    // override it
+//                    if (m_manyFiles) {
+//                        cerr << "FileFeatureWriter::setParameters: WARNING: Both many-files and one-file parameters provided, ignoring one-file" << endl;
+//                    } else {
                         m_singleFileName = i->second.c_str();
-                    }
+//                    }
                 }
             }
         } else if (i->first == "stdout") {