diff --git a/gtk2_ardour/shuttle_control.cc b/gtk2_ardour/shuttle_control.cc index 38bbfad73a..caf0d8cf73 100644 --- a/gtk2_ardour/shuttle_control.cc +++ b/gtk2_ardour/shuttle_control.cc @@ -77,7 +77,7 @@ ShuttleControl::ShuttleControl () shuttle_grabbed = false; shuttle_speed_on_grab = 0; shuttle_fract = 0.0; - shuttle_max_speed = 8.0f; + shuttle_max_speed = Config->get_max_transport_speed(); shuttle_context_menu = 0; _hovering = false; @@ -89,7 +89,7 @@ ShuttleControl::ShuttleControl () shuttle_max_speed = Config->get_shuttle_max_speed(); - if (shuttle_max_speed >= 8.f) { shuttle_max_speed = 8.0f; } + if (shuttle_max_speed >= Config->get_max_transport_speed()) { shuttle_max_speed = Config->get_max_transport_speed(); } else if (shuttle_max_speed >= 6.f) { shuttle_max_speed = 6.0f; } else if (shuttle_max_speed >= 4.f) { shuttle_max_speed = 4.0f; } else if (shuttle_max_speed >= 3.f) { shuttle_max_speed = 3.0f; } @@ -225,6 +225,8 @@ ShuttleControl::build_shuttle_context_menu () RadioMenuItem::Group speed_group; + /* XXX this code assumes that Config->get_max_transport_speed() returns 8 */ + speed_items.push_back (RadioMenuElem (speed_group, "8", sigc::bind (sigc::mem_fun (*this, &ShuttleControl::set_shuttle_max_speed), 8.0f))); if (shuttle_max_speed == 8.0) { static_cast(&speed_items.back())->set_active (); diff --git a/libs/ardour/ardour/rc_configuration_vars.h b/libs/ardour/ardour/rc_configuration_vars.h index 32c0a748be..a7a48811c9 100644 --- a/libs/ardour/ardour/rc_configuration_vars.h +++ b/libs/ardour/ardour/rc_configuration_vars.h @@ -101,6 +101,7 @@ CONFIG_VARIABLE (float, midi_track_buffer_seconds, "midi-track-buffer-seconds", CONFIG_VARIABLE (uint32_t, disk_choice_space_threshold, "disk-choice-space-threshold", 57600000) CONFIG_VARIABLE (bool, auto_analyse_audio, "auto-analyse-audio", false) CONFIG_VARIABLE (float, transient_sensitivity, "transient-sensitivity", 50) +CONFIG_VARIABLE (float, max_transport_speed, "max-transport-speed", 8.0) /* OSC */ diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc index de87fea4eb..40a0b7e358 100644 --- a/libs/ardour/session_transport.cc +++ b/libs/ardour/session_transport.cc @@ -412,9 +412,9 @@ Session::set_transport_speed (double speed, samplepos_t destination_sample, bool */ if (speed > 0) { - speed = min (8.0, speed); + speed = min ((double) Config->get_max_transport_speed(), speed); } else if (speed < 0) { - speed = max (-8.0, speed); + speed = max ((double) -Config->get_max_transport_speed(), speed); } double new_engine_speed = 1.0;