temporal: add new variant of TempoMap::bbtwalk_to_quarters()

This commit is contained in:
Paul Davis 2022-03-19 15:21:51 -06:00
parent c8afda0116
commit d29c70a2a2
2 changed files with 7 additions and 0 deletions

View File

@ -1676,6 +1676,12 @@ TempoMap::bbtwalk_to_quarters (Beats const & pos, BBT_Offset const & distance) c
return quarters_at (bbt_walk (bbt_at (pos), distance)) - pos;
}
Temporal::Beats
TempoMap::bbtwalk_to_quarters (BBT_Time const & pos, BBT_Offset const & distance) const
{
return quarters_at (bbt_walk (pos, distance)) - quarters_at (pos);
}
void
TempoMap::sample_rate_changed (samplecnt_t new_sr)
{

View File

@ -839,6 +839,7 @@ class /*LIBTEMPORAL_API*/ TempoMap : public PBD::StatefulDestructible
LIBTEMPORAL_API timecnt_t bbt_duration_at (timepos_t const & pos, BBT_Offset const & bbt) const;
LIBTEMPORAL_API Beats bbtwalk_to_quarters (Beats const & start, BBT_Offset const & distance) const;
LIBTEMPORAL_API Beats bbtwalk_to_quarters (BBT_Time const & start, BBT_Offset const & distance) const;
LIBTEMPORAL_API Temporal::timecnt_t convert_duration (Temporal::timecnt_t const & duration, Temporal::timepos_t const &, Temporal::TimeDomain domain) const;