mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-01 08:29:27 +02:00
Make polling loop period slightly shorter than Audio thread loop...
... but we don't need to make it as precise, using steady_clock. Do this so that the Audio thread doesn't read the same polling message twice, halting the scrub. It's all right that it might miss one of the messages instead.
This commit is contained in:
parent
e4e7a814c8
commit
9aad60d12c
@ -1987,7 +1987,7 @@ int AudioIO::StartStream(const TransportTracks &tracks,
|
||||
// execute too much else
|
||||
if (mScrubState) {
|
||||
mOwningProject->GetScrubber().ContinueScrubbingPoll();
|
||||
wxMilliSleep( Scrubber::ScrubPollInterval_ms );
|
||||
wxMilliSleep( Scrubber::ScrubPollInterval_ms * 0.9 );
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
@ -51,7 +51,9 @@ enum {
|
||||
ScrubSpeedStepsPerOctave = 4,
|
||||
#endif
|
||||
|
||||
kOneSecondCountdown = 1000 / Scrubber::ScrubPollInterval_ms,
|
||||
ScrubPollInterval_ms = 50,
|
||||
|
||||
kOneSecondCountdown = 1000 / ScrubPollInterval_ms,
|
||||
};
|
||||
|
||||
static const double MinStutter = 0.2;
|
||||
@ -632,7 +634,7 @@ void Scrubber::StartPolling()
|
||||
mpThread->Run();
|
||||
#endif
|
||||
|
||||
mPoller->Start(ScrubPollInterval_ms);
|
||||
mPoller->Start(ScrubPollInterval_ms * 0.9);
|
||||
}
|
||||
|
||||
void Scrubber::StopPolling()
|
||||
|
Loading…
x
Reference in New Issue
Block a user