diff transform/CSVFeatureWriter.cpp @ 1047:26cf6d5251ec cxx11

Further dedicated-types fixes
author Chris Cannam
date Tue, 10 Mar 2015 17:02:52 +0000
parents b14064bd1f97
children 870acd589a38
line wrap: on
line diff
--- a/transform/CSVFeatureWriter.cpp	Tue Mar 10 13:22:10 2015 +0000
+++ b/transform/CSVFeatureWriter.cpp	Tue Mar 10 17:02:52 2015 +0000
@@ -210,7 +210,7 @@
         }
     }
 
-    Vamp::RealTime duration;
+    ::RealTime duration;
     bool haveDuration = true;
     
     if (f.hasDuration) {
@@ -223,17 +223,17 @@
 
     if (m_sampleTiming) {
 
-        int rate = int(lrintf(transform.getSampleRate()));
+        sv_samplerate_t rate = transform.getSampleRate();
 
-        stream << Vamp::RealTime::realTime2Frame(f.timestamp, rate);
+        stream << ::RealTime::realTime2Frame(f.timestamp, rate);
 
         if (haveDuration) {
             stream << m_separator;
             if (m_endTimes) {
-                stream << Vamp::RealTime::realTime2Frame
-                    (f.timestamp + duration, rate);
+                stream << ::RealTime::realTime2Frame
+                    (::RealTime(f.timestamp) + duration, rate);
             } else {
-                stream << Vamp::RealTime::realTime2Frame(duration, rate);
+                stream << ::RealTime::realTime2Frame(duration, rate);
             }
         }
 
@@ -246,11 +246,11 @@
         if (haveDuration) {
             if (m_endTimes) {
                 QString endtime =
-                    (f.timestamp + duration).toString().c_str();
+                    (::RealTime(f.timestamp) + duration).toString().c_str();
                 endtime.replace(QRegExp("^ +"), "");
                 stream << m_separator << endtime;
             } else {
-                QString d = duration.toString().c_str();
+                QString d = ::RealTime(duration).toString().c_str();
                 d.replace(QRegExp("^ +"), "");
                 stream << m_separator << d;
             }