Don't let the RingBuffer run dry when seek-drag is very slow...

... but not stopped.  This may even make the play head back up and re-play a
little bit.
This commit is contained in:
Paul Licameli 2018-08-20 14:26:54 -04:00
parent 5cfbfd364e
commit 2806f40ab5

View File

@ -832,8 +832,14 @@ private:
mGoal = -1;
if (speed < minSpeed) {
// Trim the duration.
duration = std::max(0L, lrint(speed * duration.as_double() / minSpeed));
if (s0 != s1 && adjustStart)
// Do not trim the duration.
;
else
// Trim the duration.
duration =
std::max(0L, lrint(speed * duration.as_double() / minSpeed));
speed = minSpeed;
adjustedSpeed = true;
}