1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-16 16:10:06 +02:00

Make drag-scrub seek, rather than playing at more than unit speed

* scrubbing2:
  Make drag-scrub seek, rather than playing at more than unit speed
This commit is contained in:
Paul Licameli 2016-05-12 01:22:40 -04:00
commit b8a8c43017

View File

@ -360,7 +360,7 @@ void Scrubber::ContinueScrubbing()
const auto lastTime = gAudioIO->GetLastTimeInScrubQueue(); const auto lastTime = gAudioIO->GetLastTimeInScrubQueue();
const auto delta = mLastScrubPosition - position.x; const auto delta = mLastScrubPosition - position.x;
const double time = viewInfo.OffsetTimeByPixels(lastTime, delta); const double time = viewInfo.OffsetTimeByPixels(lastTime, delta);
result = gAudioIO->EnqueueScrubByPosition(time, mMaxScrubSpeed, false); result = gAudioIO->EnqueueScrubByPosition(time, mMaxScrubSpeed, true);
mLastScrubPosition = position.x; mLastScrubPosition = position.x;
} }
else { else {
@ -667,7 +667,7 @@ Scrubber &ScrubbingOverlay::GetScrubber()
bool Scrubber::PollIsSeeking() bool Scrubber::PollIsSeeking()
{ {
return !mDragging && (mAlwaysSeeking || ::wxGetMouseState().LeftIsDown()); return mDragging || (mAlwaysSeeking || ::wxGetMouseState().LeftIsDown());
} }
void Scrubber::DoScrub(bool scroll, bool seek) void Scrubber::DoScrub(bool scroll, bool seek)