13
0

libardour: add Region::absolute_time_to_source_time()

This commit is contained in:
Paul Davis 2023-09-30 10:52:47 -06:00
parent b89dd73324
commit ff021b83d3
2 changed files with 9 additions and 1 deletions

View File

@ -379,6 +379,8 @@ public:
Temporal::Beats absolute_time_to_region_beats (Temporal::timepos_t const &) const;
Temporal::timepos_t absolute_time_to_region_time (Temporal::timepos_t const &) const;
int apply (Filter &, PBD::Progress* progress = 0);
std::shared_ptr<ARDOUR::Playlist> playlist () const { return _playlist.lock(); }

View File

@ -2218,7 +2218,13 @@ Region::source_beats_to_absolute_beats (Temporal::Beats beats) const
Temporal::Beats
Region::absolute_time_to_region_beats(timepos_t const & b) const
{
return (position().distance (b)).beats () + start().beats();;
return (position().distance (b)).beats () + start().beats();
}
Temporal::timepos_t
Region::absolute_time_to_region_time (timepos_t const & t) const
{
return start() + position().distance (t);
}
Temporal::timepos_t