# HG changeset patch # User Chris Cannam # Date 1287997742 -7200 # Node ID badbbf0921fac7e261bbd809bdeb61bc16f03d9a # Parent 6502c33b1cb1d8e9ab16984c798ee3e8d441be83# Parent a4faa18403841b28744fc7be5619f6287322b59a Merge diff -r 6502c33b1cb1 -r badbbf0921fa data/fileio/AudioFileReader.h --- 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 diff -r 6502c33b1cb1 -r badbbf0921fa data/fileio/FileSource.cpp --- 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; diff -r 6502c33b1cb1 -r badbbf0921fa system/System.h --- 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 diff -r 6502c33b1cb1 -r badbbf0921fa transform/FileFeatureWriter.cpp --- 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") {