Mercurial > hg > svcore
diff base/RealTime.h @ 1038:cc27f35aa75c cxx11
Introducing the signed 64-bit frame index type, and fixing build failures from inclusion of -Wconversion with -Werror. Not finished yet.
author | Chris Cannam |
---|---|
date | Tue, 03 Mar 2015 15:18:24 +0000 |
parents | 75f154085a4d |
children | a1cd5abcb38b |
line wrap: on
line diff
--- a/base/RealTime.h Tue Mar 03 09:33:59 2015 +0000 +++ b/base/RealTime.h Tue Mar 03 15:18:24 2015 +0000 @@ -21,12 +21,13 @@ #ifndef _REAL_TIME_H_ #define _REAL_TIME_H_ +#include "BaseTypes.h" + #include <iostream> #include <string> struct timeval; - /** * RealTime represents time values to nanosecond precision * with accurate arithmetic and frame-rate conversion functions. @@ -149,12 +150,12 @@ /** * Convert a RealTime into a sample frame at the given sample rate. */ - static long realTime2Frame(const RealTime &r, unsigned int sampleRate); + static sv_frame_t realTime2Frame(const RealTime &r, int sampleRate); /** * Convert a sample frame at the given sample rate into a RealTime. */ - static RealTime frame2RealTime(long frame, unsigned int sampleRate); + static RealTime frame2RealTime(sv_frame_t frame, int sampleRate); static const RealTime zeroTime; };