diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-01-02 23:32:33 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-01-02 23:32:33 +0000 |
commit | f135947606e8d8374ff5567cf4bb0e0450ed3f84 (patch) | |
tree | 258246f3c710ac1a1762b8a4b00583108a62b020 /libs/timecode | |
parent | 69c7dac1a1ee70c5a4053acdc9dd139c986698a2 (diff) |
intermediate commit as all tempo/meter stuff starts to walk the precompute Bars|Beats list. Still have ::round_to_beat_subdivision() to fix. haven't really done any thorough testing at this point, but basic stuff seems OK
git-svn-id: svn://localhost/ardour2/branches/3.0@11131 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/timecode')
-rw-r--r-- | libs/timecode/timecode/bbt_time.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libs/timecode/timecode/bbt_time.h b/libs/timecode/timecode/bbt_time.h index 46307dbc04..030ac18afc 100644 --- a/libs/timecode/timecode/bbt_time.h +++ b/libs/timecode/timecode/bbt_time.h @@ -46,6 +46,24 @@ struct BBT_Time { (bars == other.bars && beats < other.beats) || (bars == other.bars && beats == other.beats && ticks < other.ticks); } + + bool operator<= (const BBT_Time& other) const { + return bars < other.bars || + (bars <= other.bars && beats <= other.beats) || + (bars <= other.bars && beats <= other.beats && ticks <= other.ticks); + } + + bool operator> (const BBT_Time& other) const { + return bars > other.bars || + (bars == other.bars && beats > other.beats) || + (bars == other.bars && beats == other.beats && ticks > other.ticks); + } + + bool operator>= (const BBT_Time& other) const { + return bars > other.bars || + (bars >= other.bars && beats >= other.beats) || + (bars >= other.bars && beats >= other.beats && ticks >= other.ticks); + } bool operator== (const BBT_Time& other) const { return bars == other.bars && beats == other.beats && ticks == other.ticks; |