Region::_start should be a timepos_t not a timecnt_t

It is an offset from an *implicit* origin (the source zero), not from an explicit origin,
and this fits with the concept underlying timepos_t. A timecnt_t requires an explicit origin,
which makes no sense in this context (just as it doesn't for the timeline as a whole).
This commit is contained in:
Paul Davis
2021-03-03 10:03:54 -07:00
parent 485b74e0b9
commit 56cde042cd
11 changed files with 64 additions and 65 deletions

View File

@@ -1243,7 +1243,7 @@ LuaAPI::Rubberband::finalize ()
ar->set_fade_out (_region->fade_out ());
*(ar->envelope ()) = *(_region->envelope ());
ar->set_ancestral_data (timecnt_t (_read_start), timecnt_t (_read_len), _stretch_ratio, _pitch_ratio);
ar->set_ancestral_data (timepos_t (_read_start), timecnt_t (_read_len), _stretch_ratio, _pitch_ratio);
ar->set_master_sources (_region->master_sources ());
ar->set_length (ar->length () * _stretch_ratio); // XXX
if (_stretch_ratio != 1.0) {