temporal: fix implementation of timepos_t::operator+= (BBT_Offset const &)

TempoMap::bbtwalk_to_quarters() converts the distance of the walk into quarters, but
we need the endpoint of the walk
This commit is contained in:
Paul Davis 2025-05-13 11:59:43 -06:00
parent 998dceb96a
commit b6e1846c39

View file

@ -778,7 +778,8 @@ timepos_t::operator+= (Temporal::BBT_Offset const & offset)
{ {
TempoMap::SharedPtr tm (TempoMap::use()); TempoMap::SharedPtr tm (TempoMap::use());
if (is_beats()) { if (is_beats()) {
v = build (true, tm->bbtwalk_to_quarters (beats(), offset).to_ticks()); Temporal::Beats r = tm->quarters_at (tm->bbt_walk (tm->bbt_at (beats()), offset));
v = build (true, r.to_ticks());
} else { } else {
v = build (false, tm->superclock_at (tm->bbt_walk (BBT_Argument (this->superclocks(), tm->bbt_at (*this)), offset))); v = build (false, tm->superclock_at (tm->bbt_walk (BBT_Argument (this->superclocks(), tm->bbt_at (*this)), offset)));
} }