comparison transform/FeatureExtractionModelTransformer.cpp @ 712:7f76499ef4f2

Minor debug change
author Chris Cannam
date Mon, 17 Oct 2011 11:57:25 +0100
parents 1424aa29ae95
children eea8049df526 5295bdb58840
comparison
equal deleted inserted replaced
709:ef3b196cf447 712:7f76499ef4f2
174 void 174 void
175 FeatureExtractionModelTransformer::createOutputModel() 175 FeatureExtractionModelTransformer::createOutputModel()
176 { 176 {
177 DenseTimeValueModel *input = getConformingInput(); 177 DenseTimeValueModel *input = getConformingInput();
178 178
179 // std::cerr << "FeatureExtractionModelTransformer: output sample type " 179 // std::cerr << "FeatureExtractionModelTransformer::createOutputModel: sample type " << m_descriptor->sampleType << ", rate " << m_descriptor->sampleRate << std::endl;
180 // << m_descriptor->sampleType << std::endl; 180
181
182 PluginRDFDescription description(m_transform.getPluginIdentifier()); 181 PluginRDFDescription description(m_transform.getPluginIdentifier());
183 QString outputId = m_transform.getOutput(); 182 QString outputId = m_transform.getOutput();
184 183
185 int binCount = 1; 184 int binCount = 1;
186 float minValue = 0.0, maxValue = 0.0; 185 float minValue = 0.0, maxValue = 0.0;
199 haveExtents = true; 198 haveExtents = true;
200 } 199 }
201 200
202 size_t modelRate = input->getSampleRate(); 201 size_t modelRate = input->getSampleRate();
203 size_t modelResolution = 1; 202 size_t modelResolution = 1;
204 203
205 switch (m_descriptor->sampleType) { 204 switch (m_descriptor->sampleType) {
206 205
207 case Vamp::Plugin::OutputDescriptor::VariableSampleRate: 206 case Vamp::Plugin::OutputDescriptor::VariableSampleRate:
208 if (m_descriptor->sampleRate != 0.0) { 207 if (m_descriptor->sampleRate != 0.0) {
209 modelResolution = size_t(modelRate / m_descriptor->sampleRate + 0.001); 208 modelResolution = size_t(modelRate / m_descriptor->sampleRate + 0.001);
634 FeatureExtractionModelTransformer::addFeature(size_t blockFrame, 633 FeatureExtractionModelTransformer::addFeature(size_t blockFrame,
635 const Vamp::Plugin::Feature &feature) 634 const Vamp::Plugin::Feature &feature)
636 { 635 {
637 size_t inputRate = m_input.getModel()->getSampleRate(); 636 size_t inputRate = m_input.getModel()->getSampleRate();
638 637
639 // SVDEBUG << "FeatureExtractionModelTransformer::addFeature(" 638 // std::cerr << "FeatureExtractionModelTransformer::addFeature: blockFrame = "
640 // << blockFrame << ")" << endl; 639 // << blockFrame << ", hasTimestamp = " << feature.hasTimestamp
640 // << ", timestamp = " << feature.timestamp << ", hasDuration = "
641 // << feature.hasDuration << ", duration = " << feature.duration
642 // << std::endl;
641 643
642 int binCount = 1; 644 int binCount = 1;
643 if (m_descriptor->hasFixedBinCount) { 645 if (m_descriptor->hasFixedBinCount) {
644 binCount = m_descriptor->binCount; 646 binCount = m_descriptor->binCount;
645 } 647 }