# HG changeset patch # User Chris Cannam # Date 1412264799 -3600 # Node ID 297f9e415e3906919ca9a12af82947bad528bee0 # Parent 0c2d8c945bbf9983ca855a92e8a1d4d249f0e8f1 Fix channel counting diff -r 0c2d8c945bbf -r 297f9e415e39 runner/FeatureExtractionManager.cpp --- a/runner/FeatureExtractionManager.cpp Thu Oct 02 15:23:25 2014 +0100 +++ b/runner/FeatureExtractionManager.cpp Thu Oct 02 16:46:39 2014 +0100 @@ -468,9 +468,7 @@ cerr << "File or URL \"" << audioSource.toStdString() << "\" opened successfully" << endl; - if (willMultiplex) { - ++m_channels; // channel count is simply number of sources - } else { + if (!willMultiplex) { if (m_channels == 0) { m_channels = reader->getChannelCount(); cerr << "Taking default channel count of " @@ -487,6 +485,12 @@ m_readyReaders[audioSource] = reader; } + + if (willMultiplex) { + ++m_channels; // channel count is simply number of sources + cerr << "Multiplexing, incremented target channel count to " + << m_channels << endl; + } } void FeatureExtractionManager::extractFeatures(QString audioSource) @@ -573,7 +577,7 @@ << reader->getNativeRate() << "Hz" << endl; if (reader->getChannelCount() != m_channels || reader->getNativeRate() != m_sampleRate) { - cerr << "NOTE: File will be mixed or resampled for processing: " + cerr << "NOTE: File will be mixed or resampled for processing, to: " << m_channels << "ch at " << m_sampleRate << "Hz" << endl; }