changeset 663:badbbf0921fa

Merge
author Chris Cannam
date Mon, 25 Oct 2010 11:09:02 +0200
parents 6502c33b1cb1 (current diff) a4faa1840384 (diff)
children c3dee40e77d2
files system/System.h
diffstat 4 files changed, 24 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/data/fileio/AudioFileReader.h	Sun Oct 24 22:10:44 2010 +0200
+++ b/data/fileio/AudioFileReader.h	Mon Oct 25 11:09:02 2010 +0200
@@ -39,7 +39,8 @@
     size_t getFrameCount() const { return m_frameCount; }
     size_t getChannelCount() const { return m_channelCount; }
     size_t getSampleRate() const { return m_sampleRate; }
-    size_t getNativeRate() const { return m_sampleRate; } // if resampled
+
+    virtual size_t getNativeRate() const { return m_sampleRate; } // if resampled
 
     /**
      * Return the location of the audio data in the reader (as passed
--- a/data/fileio/FileSource.cpp	Sun Oct 24 22:10:44 2010 +0200
+++ b/data/fileio/FileSource.cpp	Mon Oct 25 11:09:02 2010 +0200
@@ -83,8 +83,12 @@
     m_reporter(reporter),
     m_refCounted(false)
 {
+    if (m_url.toString() == "") {
+        m_url = QUrl(fileOrUrl, QUrl::TolerantMode);
+    }
+ 
 #ifdef DEBUG_FILE_SOURCE
-    std::cerr << "FileSource::FileSource(" << fileOrUrl.toStdString() << ")" << std::endl;
+    std::cerr << "FileSource::FileSource(" << fileOrUrl.toStdString() << "): url <" << m_url.toString().toStdString() << ">" << std::endl;
     incCount(m_url.toString());
 #endif
 
@@ -266,7 +270,7 @@
 
 #ifdef DEBUG_FILE_SOURCE
         std::cerr << "FileSource::init: URL translates to local filename \""
-                  << m_localFilename.toStdString() << "\"" << std::endl;
+                  << m_localFilename.toStdString() << "\" (with literal=" << literal << ")" << std::endl;
 #endif
         m_ok = true;
         m_lastStatus = 200;
--- a/system/System.h	Sun Oct 24 22:10:44 2010 +0200
+++ b/system/System.h	Mon Oct 25 11:09:02 2010 +0200
@@ -59,8 +59,8 @@
 int gettimeofday(struct timeval *p, void *tz);
 }
 
-#define ISNAN isnan
-#define ISINF isinf
+#define ISNAN _isnan
+#define ISINF _isinf
 
 #else
 
--- a/transform/FileFeatureWriter.cpp	Sun Oct 24 22:10:44 2010 +0200
+++ b/transform/FileFeatureWriter.cpp	Mon Oct 25 11:09:02 2010 +0200
@@ -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") {