mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 07:14:56 +01:00
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:
parent
838a8a0137
commit
e38ac84184
2 changed files with 13 additions and 13 deletions
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
namespace Timecode {
|
namespace Timecode {
|
||||||
|
|
||||||
float Time::default_rate = 30.0;
|
double Time::default_rate = 30.0;
|
||||||
|
|
||||||
|
|
||||||
/** Increment @a timecode by exactly one frame (keep subframes value).
|
/** 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)
|
timecode_to_frames_per_second(TimecodeFormat t)
|
||||||
{
|
{
|
||||||
switch (t) {
|
switch (t) {
|
||||||
|
|
|
||||||
|
|
@ -48,17 +48,17 @@ enum TimecodeFormat {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Time {
|
struct Time {
|
||||||
bool negative;
|
bool negative;
|
||||||
uint32_t hours;
|
uint32_t hours;
|
||||||
uint32_t minutes;
|
uint32_t minutes;
|
||||||
uint32_t seconds;
|
uint32_t seconds;
|
||||||
uint32_t frames; ///< Timecode frames (not audio samples)
|
uint32_t frames; ///< Timecode frames (not audio samples)
|
||||||
uint32_t subframes; ///< Typically unused
|
uint32_t subframes; ///< Typically unused
|
||||||
float rate; ///< Frame rate of this Time
|
double rate; ///< Frame rate of this Time
|
||||||
static float default_rate; ///< Rate to use for default constructor
|
static double default_rate; ///< Rate to use for default constructor
|
||||||
bool drop; ///< Whether this Time uses dropframe Timecode
|
bool drop; ///< Whether this Time uses dropframe Timecode
|
||||||
|
|
||||||
Time (float a_rate = default_rate) {
|
Time (double a_rate = default_rate) {
|
||||||
negative = false;
|
negative = false;
|
||||||
hours = 0;
|
hours = 0;
|
||||||
minutes = 0;
|
minutes = 0;
|
||||||
|
|
@ -99,7 +99,7 @@ void seconds_floor (Time& timecode);
|
||||||
void minutes_floor (Time& timecode);
|
void minutes_floor (Time& timecode);
|
||||||
void hours_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);
|
bool timecode_has_drop_frames(TimecodeFormat const t);
|
||||||
|
|
||||||
std::string timecode_format_name (TimecodeFormat const t);
|
std::string timecode_format_name (TimecodeFormat const t);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue