Unbreak SMPTE ruler at non-30fps rates. Display 60fps properly. Use the same data types for SMPTE::Time.rate and dropframe as are used in Config.

git-svn-id: svn://localhost/ardour2/trunk@1198 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Nick Mainsbridge 2006-12-08 22:08:36 +00:00
parent 3039691723
commit 6146d6aa6f
3 changed files with 75 additions and 61 deletions

View file

@ -31,28 +31,18 @@ enum Wrap {
HOURS
};
/** SMPTE frame rate (in frames per second).
*
* This should be eliminated in favour of a float to support arbitrary rates.
*/
enum FPS {
MTC_24_FPS = 0,
MTC_25_FPS = 1,
MTC_30_FPS_DROP = 2,
MTC_30_FPS = 3
};
struct Time {
bool negative;
uint32_t hours;
uint32_t minutes;
uint32_t seconds;
uint32_t frames; ///< SMPTE frames (not audio samples)
uint32_t subframes; ///< Typically unused
FPS rate; ///< Frame rate of this Time
static FPS default_rate; ///< Rate to use for default constructor
uint32_t frames; ///< SMPTE 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 SMPTE
Time(FPS a_rate = default_rate) {
Time(float a_rate = default_rate) {
negative = false;
hours = 0;
minutes = 0;