changeset 30:4412c619b373 vamp-plugin-sdk-v0.9rc2

* Fix rounding error in RealTime (thanks to Craig Sapp)
author cannam
date Tue, 16 May 2006 11:48:27 +0000
parents d97aafa99828
children 0e7aa8fabd76
files vamp-sdk/RealTime.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/vamp-sdk/RealTime.cpp	Tue May 16 11:33:50 2006 +0000
+++ b/vamp-sdk/RealTime.cpp	Tue May 16 11:48:27 2006 +0000
@@ -87,7 +87,7 @@
 RealTime
 RealTime::fromSeconds(double sec)
 {
-    return RealTime(int(sec), int((sec - int(sec)) * ONE_BILLION));
+    return RealTime(int(sec), int((sec - int(sec)) * ONE_BILLION + 0.5));
 }
 
 RealTime