comparison transform/FeatureExtractionModelTransformer.cpp @ 686:b4a8d8221eaf debug-output

Remove most toStdString calls (no longer needed, with debug header)
author Chris Cannam
date Thu, 12 May 2011 17:31:24 +0100
parents c8badbd4c005
children 06f13a3b9e9e
comparison
equal deleted inserted replaced
685:99222d4bfc78 686:b4a8d8221eaf
41 ModelTransformer(in, transform), 41 ModelTransformer(in, transform),
42 m_plugin(0), 42 m_plugin(0),
43 m_descriptor(0), 43 m_descriptor(0),
44 m_outputFeatureNo(0) 44 m_outputFeatureNo(0)
45 { 45 {
46 // std::cerr << "FeatureExtractionModelTransformer::FeatureExtractionModelTransformer: plugin " << pluginId.toStdString() << ", outputName " << m_transform.getOutput().toStdString() << std::endl; 46 // std::cerr << "FeatureExtractionModelTransformer::FeatureExtractionModelTransformer: plugin " << pluginId << ", outputName " << m_transform.getOutput() << std::endl;
47 47
48 QString pluginId = transform.getPluginIdentifier(); 48 QString pluginId = transform.getPluginIdentifier();
49 49
50 FeatureExtractionPluginFactory *factory = 50 FeatureExtractionPluginFactory *factory =
51 FeatureExtractionPluginFactory::instanceFor(pluginId); 51 FeatureExtractionPluginFactory::instanceFor(pluginId);
150 m_message = tr("Plugin \"%1\" has no outputs").arg(pluginId); 150 m_message = tr("Plugin \"%1\" has no outputs").arg(pluginId);
151 return; 151 return;
152 } 152 }
153 153
154 for (size_t i = 0; i < outputs.size(); ++i) { 154 for (size_t i = 0; i < outputs.size(); ++i) {
155 // std::cerr << "comparing output " << i << " name \"" << outputs[i].identifier << "\" with expected \"" << m_transform.getOutput().toStdString() << "\"" << std::endl; 155 // std::cerr << "comparing output " << i << " name \"" << outputs[i].identifier << "\" with expected \"" << m_transform.getOutput() << "\"" << std::endl;
156 if (m_transform.getOutput() == "" || 156 if (m_transform.getOutput() == "" ||
157 outputs[i].identifier == m_transform.getOutput().toStdString()) { 157 outputs[i].identifier == m_transform.getOutput().toStdString()) {
158 m_outputFeatureNo = i; 158 m_outputFeatureNo = i;
159 m_descriptor = new Vamp::Plugin::OutputDescriptor(outputs[i]); 159 m_descriptor = new Vamp::Plugin::OutputDescriptor(outputs[i]);
160 break; 160 break;
517 buffers[ch][i*2] = reals[i]; 517 buffers[ch][i*2] = reals[i];
518 buffers[ch][i*2+1] = imaginaries[i]; 518 buffers[ch][i*2+1] = imaginaries[i];
519 } 519 }
520 error = fftModels[ch]->getError(); 520 error = fftModels[ch]->getError();
521 if (error != "") { 521 if (error != "") {
522 std::cerr << "FeatureExtractionModelTransformer::run: Abandoning, error is " << error.toStdString() << std::endl; 522 std::cerr << "FeatureExtractionModelTransformer::run: Abandoning, error is " << error << std::endl;
523 m_abandoned = true; 523 m_abandoned = true;
524 m_message = error; 524 m_message = error;
525 } 525 }
526 } 526 }
527 } else { 527 } else {