Mercurial > hg > svcore
comparison 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 |
comparison
equal
deleted
inserted
replaced
783:459235dccff6 | 785:05ba4bbd2b87 |
---|---|
199 haveExtents = true; | 199 haveExtents = true; |
200 } | 200 } |
201 | 201 |
202 size_t modelRate = input->getSampleRate(); | 202 size_t modelRate = input->getSampleRate(); |
203 size_t modelResolution = 1; | 203 size_t modelResolution = 1; |
204 | |
205 if (m_descriptor->sampleType != | |
206 Vamp::Plugin::OutputDescriptor::OneSamplePerStep) { | |
207 if (m_descriptor->sampleRate > input->getSampleRate()) { | |
208 std::cerr << "WARNING: plugin reports output sample rate as " | |
209 << m_descriptor->sampleRate << " (can't display features with finer resolution than the input rate of " << input->getSampleRate() << ")" << std::endl; | |
210 } | |
211 } | |
204 | 212 |
205 switch (m_descriptor->sampleType) { | 213 switch (m_descriptor->sampleType) { |
206 | 214 |
207 case Vamp::Plugin::OutputDescriptor::VariableSampleRate: | 215 case Vamp::Plugin::OutputDescriptor::VariableSampleRate: |
208 if (m_descriptor->sampleRate != 0.0) { | 216 if (m_descriptor->sampleRate != 0.0) { |