use double for timecode fps.

git-svn-id: svn://localhost/ardour2/branches/3.0@13404 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Robin Gareus 2012-11-09 07:48:06 +00:00
parent 838a8a0137
commit e38ac84184
2 changed files with 13 additions and 13 deletions

View File

@ -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) {

View File

@ -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);