Mercurial > hg > sonic-annotator
diff runner/FeatureExtractionManager.cpp @ 219:d0fe861bb116
Fix grisly error in multiplexed audio reader (calling itself!)
author | Chris Cannam |
---|---|
date | Fri, 20 Nov 2015 09:32:11 +0000 |
parents | c17b184c16db |
children | 88044af67bd1 |
line wrap: on
line diff
--- a/runner/FeatureExtractionManager.cpp Fri Nov 20 09:31:55 2015 +0000 +++ b/runner/FeatureExtractionManager.cpp Fri Nov 20 09:32:11 2015 +0000 @@ -616,6 +616,12 @@ if (!reader) { throw FailedToOpenFile(source); } + if (reader->getChannelCount() != m_channels || + reader->getNativeRate() != m_sampleRate) { + cerr << "NOTE: File will be mixed or resampled for processing, to: " + << m_channels << "ch at " + << m_sampleRate << "Hz" << endl; + } return reader; } @@ -628,12 +634,6 @@ cerr << "Audio file \"" << audioSource.toStdString() << "\": " << reader->getChannelCount() << "ch at " << reader->getNativeRate() << "Hz" << endl; - if (reader->getChannelCount() != m_channels || - reader->getNativeRate() != m_sampleRate) { - cerr << "NOTE: File will be mixed or resampled for processing, to: " - << m_channels << "ch at " - << m_sampleRate << "Hz" << endl; - } // allocate audio buffers float **data = new float *[m_channels];