diff transform/FeatureExtractionModelTransformer.cpp @ 802:98cf98a217d2 qt5

Merge
author Chris Cannam
date Thu, 09 May 2013 17:31:31 +0100
parents ed3779b2b4a8 ebe3ca2bb556
children 54829c1e155e e802e550a1f2
line wrap: on
line diff
--- a/transform/FeatureExtractionModelTransformer.cpp	Thu May 09 17:30:44 2013 +0100
+++ b/transform/FeatureExtractionModelTransformer.cpp	Thu May 09 17:31:31 2013 +0100
@@ -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:
@@ -704,8 +712,6 @@
                 label = QString("[%1] %2").arg(i+1).arg(label);
             }
 
-            std::cerr << "Adding point at " << frame << " with value " << value << " and label " << label << std::endl;
-
             model->addPoint(SparseTimeValueModel::Point(frame, value, label));
         }