minor code reworking for 46fca9062d (no semantic changes)

This commit is contained in:
Paul Davis 2020-04-23 09:05:18 -06:00
parent 46fca9062d
commit 24ed3c5a9e
1 changed files with 6 additions and 2 deletions

View File

@ -1996,8 +1996,12 @@ ARDOUR_UI::transport_ffwd_rewind (int option, int dir)
break;
}
bool speed_up = (dir > 0 && current_transport_speed >= target_speed);
speed_up = speed_up || (dir < 0 && current_transport_speed <= target_speed);
/* if wanting to move forward/backward and current speed is at or above current
speed (i.e. same direction, and moving), then speed up.
*/
const bool speed_up = (dir > 0 && current_transport_speed >= target_speed) || (dir < 0 && current_transport_speed <= target_speed);
if (speed_up) {
target_speed = current_transport_speed * 1.5f;
}