comparison transform/FeatureExtractionPluginTransform.cpp @ 137:006c90387f40

* Fix many compile warnings, remove some debug output
author Chris Cannam
date Mon, 30 Apr 2007 13:36:23 +0000
parents 7a5ba9dadbf7
children dfaf4f9330b5
comparison
equal deleted inserted replaced
136:37c26877ca5f 137:006c90387f40
430 Vamp::Plugin::OutputDescriptor::FixedSampleRate) { 430 Vamp::Plugin::OutputDescriptor::FixedSampleRate) {
431 431
432 if (feature.hasTimestamp) { 432 if (feature.hasTimestamp) {
433 //!!! warning: sampleRate may be non-integral 433 //!!! warning: sampleRate may be non-integral
434 frame = Vamp::RealTime::realTime2Frame(feature.timestamp, 434 frame = Vamp::RealTime::realTime2Frame(feature.timestamp,
435 m_descriptor->sampleRate); 435 lrintf(m_descriptor->sampleRate));
436 } else { 436 } else {
437 frame = m_output->getEndFrame(); 437 frame = m_output->getEndFrame();
438 } 438 }
439 } 439 }
440 440
466 if (feature.values.size() > 2) velocity = feature.values[2]; 466 if (feature.values.size() > 2) velocity = feature.values[2];
467 467
468 NoteModel *model = getOutput<NoteModel>(); 468 NoteModel *model = getOutput<NoteModel>();
469 if (!model) return; 469 if (!model) return;
470 470
471 model->addPoint(NoteModel::Point(frame, pitch, duration, feature.label.c_str())); 471 model->addPoint(NoteModel::Point(frame, pitch,
472 lrintf(duration),
473 feature.label.c_str()));
472 474
473 } else { 475 } else {
474 476
475 DenseThreeDimensionalModel::Column values = feature.values; 477 DenseThreeDimensionalModel::Column values = feature.values;
476 478