comparison VampTestPlugin.cpp @ 21:8984ab4a0213

Input time better as frame value I think
author Chris Cannam
date Wed, 14 Jan 2015 11:39:55 +0000
parents cfff2b6ff0fd
children d7f18dca3f48
comparison
equal deleted inserted replaced
20:cfff2b6ff0fd 21:8984ab4a0213
291 m_outputNumbers[d.identifier] = n++; 291 m_outputNumbers[d.identifier] = n++;
292 list.push_back(d); 292 list.push_back(d);
293 293
294 d.identifier = "input-timestamp"; 294 d.identifier = "input-timestamp";
295 d.name = "Input timestamp"; 295 d.name = "Input timestamp";
296 d.description = "One-sample-per-step features with one value, containing the time in seconds converted from the timestamp of the corresponding process input block."; 296 d.description = "One-sample-per-step features with one value, containing the time in sample frames converted from the timestamp of the corresponding process input block.";
297 d.unit = "s"; 297 d.unit = "samples";
298 d.hasFixedBinCount = true; 298 d.hasFixedBinCount = true;
299 d.binCount = 1; 299 d.binCount = 1;
300 d.hasKnownExtents = false; 300 d.hasKnownExtents = false;
301 d.isQuantized = false; 301 d.isQuantized = false;
302 d.sampleType = OutputDescriptor::OneSamplePerStep; 302 d.sampleType = OutputDescriptor::OneSamplePerStep;
521 f.values.push_back(sum); 521 f.values.push_back(sum);
522 } 522 }
523 fs[m_outputNumbers["input-summary"]].push_back(f); 523 fs[m_outputNumbers["input-summary"]].push_back(f);
524 524
525 f.values.clear(); 525 f.values.clear();
526 f.values.push_back(float(timestamp / RealTime(1, 0))); 526 f.values.push_back(RealTime::realTime2Frame(timestamp, m_inputSampleRate));
527 fs[m_outputNumbers["input-timestamp"]].push_back(f); 527 fs[m_outputNumbers["input-timestamp"]].push_back(f);
528 528
529 return fs; 529 return fs;
530 } 530 }
531 531