remove Session::bbt_time() and use TempoMap::use()->bbt_at() explicitly everywhere (GUI edition)

This commit is contained in:
Paul Davis 2021-12-14 13:23:19 -07:00
parent 12847b0125
commit 91f38f9c4e
4 changed files with 13 additions and 7 deletions

View file

@ -113,7 +113,7 @@ VerboseCursor::set_time (samplepos_t sample)
switch (m) {
case AudioClock::BBT:
_editor->_session->bbt_time (timepos_t (sample), bbt);
bbt = TempoMap::use()->bbt_at (timepos_t (sample));
snprintf (buf, sizeof (buf), "%02" PRIu32 "|%02" PRIu32 "|%02" PRIu32, bbt.bars, bbt.beats, bbt.ticks);
break;
@ -156,8 +156,8 @@ VerboseCursor::set_duration (samplepos_t start, samplepos_t end)
switch (m) {
case AudioClock::BBT:
{
_editor->_session->bbt_time (timepos_t (start), sbbt);
_editor->_session->bbt_time (timepos_t (end), ebbt);
sbbt = TempoMap::use()->bbt_at (timepos_t (start));
ebbt = TempoMap::use()->bbt_at (timepos_t (end));
/* subtract */
/* XXX this computation won't work well if the