mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-22 22:56:32 +01:00
temporal: add BBT_Time::round_up_to_beat_div()
This commit is contained in:
parent
7c5e7ddf59
commit
f1f5df7c9a
2 changed files with 20 additions and 0 deletions
|
|
@ -115,6 +115,7 @@ struct LIBTEMPORAL_API BBT_Time
|
|||
BBT_Time round_to_beat () const { return ticks >= (ticks_per_beat/2) ? BBT_Time (bars, beats+1, 0) : BBT_Time (bars, beats, 0); }
|
||||
BBT_Time round_down_to_beat () const { return BBT_Time (bars, beats, 0); }
|
||||
BBT_Time round_up_to_beat () const { return ticks ? BBT_Time (bars, beats+1, 0) : *this; }
|
||||
BBT_Time round_up_to_beat_div (int beat_div) const;
|
||||
|
||||
/* cannot implement round_to_bar() without knowing meter (time
|
||||
* signature) information, since it requires knowing how many beats
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue