changeset 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
files VampTestPlugin.cpp
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/VampTestPlugin.cpp	Wed Jan 14 10:55:32 2015 +0000
+++ b/VampTestPlugin.cpp	Wed Jan 14 11:39:55 2015 +0000
@@ -293,8 +293,8 @@
 
     d.identifier = "input-timestamp";
     d.name = "Input timestamp";
-    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.";
-    d.unit = "s";
+    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.";
+    d.unit = "samples";
     d.hasFixedBinCount = true;
     d.binCount = 1;
     d.hasKnownExtents = false;
@@ -523,7 +523,7 @@
     fs[m_outputNumbers["input-summary"]].push_back(f);
 
     f.values.clear();
-    f.values.push_back(float(timestamp / RealTime(1, 0)));
+    f.values.push_back(RealTime::realTime2Frame(timestamp, m_inputSampleRate));
     fs[m_outputNumbers["input-timestamp"]].push_back(f);
     
     return fs;