mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-16 08:34:10 +02:00
Don't squeak when starting a drag-scrub
This commit is contained in:
parent
e4a2d23017
commit
24ef578a89
@ -49,6 +49,7 @@ enum {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const double MinStutter = 0.2;
|
static const double MinStutter = 0.2;
|
||||||
|
static const double MaxDragSpeed = 1.0;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
double FindScrubbingSpeed(const ViewInfo &viewInfo, double maxScrubSpeed, double screen, double timeAtMouse)
|
double FindScrubbingSpeed(const ViewInfo &viewInfo, double maxScrubSpeed, double screen, double timeAtMouse)
|
||||||
@ -311,8 +312,7 @@ bool Scrubber::MaybeStartScrubbing(wxCoord xx)
|
|||||||
#else
|
#else
|
||||||
// That idea seems unpopular... just make it one for move-scrub,
|
// That idea seems unpopular... just make it one for move-scrub,
|
||||||
// but big for drag-scrub
|
// but big for drag-scrub
|
||||||
mOptions.maxSpeed =
|
mOptions.maxSpeed = mDragging ? MaxDragSpeed : 1.0;
|
||||||
mDragging ? ScrubbingOptions::MaxAllowedScrubSpeed() : 1.0;
|
|
||||||
#endif
|
#endif
|
||||||
mOptions.minSample = 0;
|
mOptions.minSample = 0;
|
||||||
mOptions.maxSample =
|
mOptions.maxSample =
|
||||||
@ -420,7 +420,9 @@ void Scrubber::ContinueScrubbing()
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
mOptions.enqueueBySpeed = false;
|
mOptions.enqueueBySpeed = false;
|
||||||
result = gAudioIO->EnqueueScrub(time, seek ? 1.0 : mOptions.maxSpeed, mOptions);
|
auto maxSpeed =
|
||||||
|
(mDragging || !seek) ? mOptions.maxSpeed : 1.0;
|
||||||
|
result = gAudioIO->EnqueueScrub(time, maxSpeed, mOptions);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user