diff src/vamp-sdk/RealTime.cpp @ 421:35fa4733bc5d

Fix compiler warnings, and fix potential mangling of utf8 when downcasing (this is still a nasty and incomplete way to do it though)
author Chris Cannam
date Thu, 14 Apr 2016 11:49:12 +0100
parents 6f88563ea26f
children e2716b9352ca
line wrap: on
line diff
--- a/src/vamp-sdk/RealTime.cpp	Thu Apr 14 09:19:28 2016 +0100
+++ b/src/vamp-sdk/RealTime.cpp	Thu Apr 14 11:49:12 2016 +0100
@@ -112,7 +112,7 @@
 RealTime
 RealTime::fromTimeval(const struct timeval &tv)
 {
-    return RealTime(tv.tv_sec, tv.tv_usec * 1000);
+    return RealTime(int(tv.tv_sec), int(tv.tv_usec * 1000));
 }
 #endif
 
@@ -236,7 +236,7 @@
     if (frame < 0) return -frame2RealTime(-frame, sampleRate);
 
     RealTime rt;
-    rt.sec = frame / long(sampleRate);
+    rt.sec = int(frame / long(sampleRate));
     frame -= rt.sec * long(sampleRate);
     rt.nsec = (int)(((double(frame) * 1000000.0) / sampleRate) * 1000.0);
     return rt;