1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-05 00:23:56 +01:00

Don't halt scrub playback with display paging at high magnification

This commit is contained in:
Paul Licameli
2018-09-09 13:40:10 -04:00
parent 52ad43daac
commit f31a1a6f8e

View File

@@ -570,7 +570,23 @@ void Scrubber::ContinueScrubbingPoll()
else
#endif
{
const double time = viewInfo.PositionToTime(position.x, trackPanel->GetLeftOffset());
const auto origin = trackPanel->GetLeftOffset();
auto xx = position.x;
if (!seek && !mSmoothScrollingScrub) {
// If mouse is out-of-bounds, so that we scrub at maximum speed
// toward the mouse position, then move the target time to a more
// extreme position to avoid catching-up and halting before the
// screen scrolls.
int width;
trackPanel->GetTracksUsableArea(&width, NULL);
auto delta = xx - origin;
if (delta < 0)
delta -= width;
else if (delta >= width)
delta += width;
xx = origin + delta;
}
const double time = viewInfo.PositionToTime(xx, origin);
mOptions.adjustStart = seek;
mOptions.minSpeed = seek ? 1.0 : 0.0;
mOptions.maxSpeed = seek ? 1.0 : mMaxSpeed;