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

@ -216,7 +216,7 @@ timecnt_t
SMFSource::read_unlocked (const Lock& lock,
Evoral::EventSink<samplepos_t>& destination,
timepos_t const & source_start,
timecnt_t const & start,
timepos_t const & start,
timecnt_t const & duration,
Temporal::Range* loop_range,
MidiStateTracker* tracker,
@ -244,7 +244,7 @@ SMFSource::read_unlocked (const Lock& lock,
DEBUG_TRACE (DEBUG::MidiSourceIO, string_compose ("SMF read_unlocked: start in ticks %1\n", start_ticks));
if (_smf_last_read_end == 0 || start != _smf_last_read_end) {
if (_smf_last_read_end.zero() || start != _smf_last_read_end) {
DEBUG_TRACE (DEBUG::MidiSourceIO, string_compose ("SMF read_unlocked: seek to %1\n", start));
Evoral::SMF::seek_to_start();
while (time < start_ticks) {