temporal: use muldiv_round to avoid overflow in TempoMetric::superclocks_per_grid()
This commit is contained in:
parent
883527ba3e
commit
d9ed0f0d2e
@ -503,7 +503,7 @@ class LIBTEMPORAL_API TempoMetric
|
||||
return superclocks_per_grid () * _meter->divisions_per_bar();
|
||||
}
|
||||
superclock_t superclocks_per_grid () const {
|
||||
return int_div_round (_tempo->superclocks_per_note_type() * _tempo->note_type(), (int64_t) _meter->note_value());
|
||||
return PBD::muldiv_round (_tempo->superclocks_per_note_type(), _tempo->note_type(), (int64_t) _meter->note_value());
|
||||
}
|
||||
|
||||
superclock_t superclocks_per_note_type_at_superclock (superclock_t sc) const {
|
||||
|
Loading…
Reference in New Issue
Block a user