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

Keyboard scrubbing: faster change of direction

If one of the keyboard scrubbing keys is being held down, and the other keyboard scrubbing key is pressed:
1. With current behaviour, scrubbing in the other direction only starts when the original key is released - scrubbing stops and then starts in the other direction.
2. With the new behaviour, scrubbing immediately changes direction, and does not stop when the original key is released - scrubbing does not stop and then start again.

New behaviour:
If one of the keyboard scrubbing keys is being held down,
This commit is contained in:
David Bailes
2020-01-13 13:40:59 +00:00
parent 6fd29ad863
commit 64079c3f55
5 changed files with 41 additions and 10 deletions

View File

@@ -2827,14 +2827,13 @@ void AudioIO::FillBuffers()
if (!mSilentScrub)
{
for (i = 0; i < mPlaybackTracks.size(); i++) {
if (mPlaybackSchedule.mPlayMode == PlaybackSchedule::PLAY_AT_SPEED ||
mPlaybackSchedule.mPlayMode == PlaybackSchedule::PLAY_KEYBOARD_SCRUB) {
mPlaybackMixers[i]->SetSpeed(mScrubSpeed);
}
else {
if (mPlaybackSchedule.mPlayMode == PlaybackSchedule::PLAY_AT_SPEED)
mPlaybackMixers[i]->SetSpeedForPlayAtSpeed(mScrubSpeed);
else if (mPlaybackSchedule.mPlayMode == PlaybackSchedule::PLAY_KEYBOARD_SCRUB)
mPlaybackMixers[i]->SetSpeedForKeyboardScrubbing(mScrubSpeed, startTime);
else
mPlaybackMixers[i]->SetTimesAndSpeed(
startTime, endTime, fabs( mScrubSpeed ));
}
}
}
mTimeQueue.mLastTime = startTime;