summaryrefslogtreecommitdiff
path: root/libs/timecode
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2012-11-09 07:48:06 +0000
committerRobin Gareus <robin@gareus.org>2012-11-09 07:48:06 +0000
commite38ac84184d2719b982e1d71964fe6db7bdff56c (patch)
tree90e6d3e7057c0628af9d872fd98e08d63772310f /libs/timecode
parent838a8a01371a95bf7efa4dd94d96055c6dde344c (diff)
use double for timecode fps.
git-svn-id: svn://localhost/ardour2/branches/3.0@13404 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/timecode')
-rw-r--r--libs/timecode/src/time.cc4
-rw-r--r--libs/timecode/timecode/time.h24
2 files changed, 14 insertions, 14 deletions
diff --git a/libs/timecode/src/time.cc b/libs/timecode/src/time.cc
index b848db79b3..2d41d9b622 100644
--- a/libs/timecode/src/time.cc
+++ b/libs/timecode/src/time.cc
@@ -26,7 +26,7 @@
namespace Timecode {
-float Time::default_rate = 30.0;
+double Time::default_rate = 30.0;
/** Increment @a timecode by exactly one frame (keep subframes value).
@@ -424,7 +424,7 @@ hours_floor(Time& timecode)
}
}
-float
+double
timecode_to_frames_per_second(TimecodeFormat t)
{
switch (t) {
diff --git a/libs/timecode/timecode/time.h b/libs/timecode/timecode/time.h
index 256d8feaaf..23655bfe5d 100644
--- a/libs/timecode/timecode/time.h
+++ b/libs/timecode/timecode/time.h
@@ -48,17 +48,17 @@ enum TimecodeFormat {
};
struct Time {
- bool negative;
- uint32_t hours;
- uint32_t minutes;
- uint32_t seconds;
- uint32_t frames; ///< Timecode frames (not audio samples)
- uint32_t subframes; ///< Typically unused
- float rate; ///< Frame rate of this Time
- static float default_rate; ///< Rate to use for default constructor
- bool drop; ///< Whether this Time uses dropframe Timecode
-
- Time (float a_rate = default_rate) {
+ bool negative;
+ uint32_t hours;
+ uint32_t minutes;
+ uint32_t seconds;
+ uint32_t frames; ///< Timecode frames (not audio samples)
+ uint32_t subframes; ///< Typically unused
+ double rate; ///< Frame rate of this Time
+ static double default_rate; ///< Rate to use for default constructor
+ bool drop; ///< Whether this Time uses dropframe Timecode
+
+ Time (double a_rate = default_rate) {
negative = false;
hours = 0;
minutes = 0;
@@ -99,7 +99,7 @@ void seconds_floor (Time& timecode);
void minutes_floor (Time& timecode);
void hours_floor (Time& timecode);
-float timecode_to_frames_per_second(TimecodeFormat const t);
+double timecode_to_frames_per_second(TimecodeFormat const t);
bool timecode_has_drop_frames(TimecodeFormat const t);
std::string timecode_format_name (TimecodeFormat const t);