size_t events_read = 0;
- _playback_buf->skip_to (playback_sample);
-
if (loc) {
framepos_t effective_start;
_playback_buf->resolve_tracker (dst, 0);
}
+ _playback_buf->skip_to (effective_start);
+
if (loc->end() >= effective_start && loc->end() < effective_start + nframes) {
/* end of loop is within the range we are reading, so
split the read in two, and lie about the location
events_read = _playback_buf->read (dst, effective_start, effective_start + nframes);
}
} else {
+ _playback_buf->skip_to (playback_sample);
events_read = _playback_buf->read (dst, playback_sample, playback_sample + nframes);
}