mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 00:34:59 +01:00
temporal: fix a bug in BBT_Time::round_up_to_bar()
Also remove Meter:: versions of related methods, because they are not necessary. We only need metrical information for operations like ::round_to_bar()
This commit is contained in:
parent
076ad9a9b6
commit
cc6a437faf
5 changed files with 19 additions and 35 deletions
|
|
@ -23,6 +23,20 @@
|
|||
|
||||
using namespace Temporal;
|
||||
|
||||
BBT_Time
|
||||
BBT_Time::round_up_to_bar() const
|
||||
{
|
||||
if (ticks == 0 && beats == 1) {
|
||||
return *this;
|
||||
}
|
||||
BBT_Time b = round_up_to_beat ();
|
||||
if (b.beats > 1) {
|
||||
b.bars += 1;
|
||||
b.beats = 1;
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
||||
BBT_Offset::BBT_Offset (double dbeats)
|
||||
{
|
||||
/* NOTE: this does not construct a BBT time in a canonical form,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue