mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 08:36:32 +01:00
Honour forward/rewind option when already rolling #8031
The options ForwardSlow, Forward and ForwardFast and their respective Rewind options were not honoured in the execution of forward/rewind operations when the transport was already rolling at a slower speed than the forward or rewind option's speed with same direction as the requested direction.
This commit is contained in:
parent
54bc1018d5
commit
46fca9062d
1 changed files with 17 additions and 16 deletions
|
|
@ -1981,10 +1981,9 @@ ARDOUR_UI::transport_ffwd_rewind (int option, int dir)
|
||||||
* (-1, 0, 1) to get directional value
|
* (-1, 0, 1) to get directional value
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const float current_transport_speed = _session->engine_speed () * _session->transport_speed();
|
const float current_transport_speed = _session->engine_speed () * _session->transport_speed ();
|
||||||
float target_speed;
|
float target_speed = current_transport_speed;
|
||||||
|
|
||||||
if ((dir < 0 && current_transport_speed >= 0.0f) || (dir > 0 && current_transport_speed <= 0.0f)) {
|
|
||||||
switch (option) {
|
switch (option) {
|
||||||
case 0:
|
case 0:
|
||||||
target_speed = dir * 1.0f;
|
target_speed = dir * 1.0f;
|
||||||
|
|
@ -1996,8 +1995,10 @@ ARDOUR_UI::transport_ffwd_rewind (int option, int dir)
|
||||||
target_speed = dir * 0.5f;
|
target_speed = dir * 0.5f;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
/* speed up */
|
bool speed_up = (dir > 0 && current_transport_speed >= target_speed);
|
||||||
|
speed_up = speed_up || (dir < 0 && current_transport_speed <= target_speed);
|
||||||
|
if (speed_up) {
|
||||||
target_speed = current_transport_speed * 1.5f;
|
target_speed = current_transport_speed * 1.5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue