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 + 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 (float a_rate = default_rate) { + 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);