57 const int64 start = nextPlayPos;
61 const int64 newStart = start % reader->lengthInSamples;
62 const int64 newEnd = (start + info.
numSamples) % reader->lengthInSamples;
64 if (newEnd > newStart)
67 (
int) (newEnd - newStart), newStart,
true,
true);
71 const int endSamps = (int) (reader->lengthInSamples - newStart);
74 endSamps, newStart,
true,
true);
77 (
int) newEnd, 0,
true,
true);
84 const auto samplesToRead = jlimit (int64{},
86 reader->lengthInSamples - start);
88 reader->read (info.
buffer, info.
startSample, (
int) samplesToRead, start,
true,
true);