Mercurial > hg > svcore
diff transform/FeatureExtractionModelTransformer.cpp @ 785:05ba4bbd2b87
Warn if the output sample rate is higher than that of the input model
author | Chris Cannam |
---|---|
date | Thu, 28 Mar 2013 17:08:04 +0000 |
parents | cf466a5d411e |
children | 84013dc0ed77 |
line wrap: on
line diff
--- a/transform/FeatureExtractionModelTransformer.cpp Thu Mar 28 10:01:55 2013 +0000 +++ b/transform/FeatureExtractionModelTransformer.cpp Thu Mar 28 17:08:04 2013 +0000 @@ -202,6 +202,14 @@ size_t modelRate = input->getSampleRate(); size_t modelResolution = 1; + if (m_descriptor->sampleType != + Vamp::Plugin::OutputDescriptor::OneSamplePerStep) { + if (m_descriptor->sampleRate > input->getSampleRate()) { + std::cerr << "WARNING: plugin reports output sample rate as " + << m_descriptor->sampleRate << " (can't display features with finer resolution than the input rate of " << input->getSampleRate() << ")" << std::endl; + } + } + switch (m_descriptor->sampleType) { case Vamp::Plugin::OutputDescriptor::VariableSampleRate: