summaryrefslogtreecommitdiff
path: root/gtk2_ardour/shuttle_control.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2019-07-10 23:32:14 -0600
committerPaul Davis <paul@linuxaudiosystems.com>2019-09-17 17:19:15 -0600
commitb84c99639f0dd28e210ed9c064429c17014093a7 (patch)
treea4b6c50dc9d4859b7e53e100533a67ed6c859a04 /gtk2_ardour/shuttle_control.cc
parentea30642ae3eac3706dbef1f70f8d13e8ebfec51d (diff)
parametize the maximum transport speed.
No GUI to adjust this at this, nor is any planned. This just makes it easier if we ever feel we can change this.
Diffstat (limited to 'gtk2_ardour/shuttle_control.cc')
-rw-r--r--gtk2_ardour/shuttle_control.cc6
1 files changed, 4 insertions, 2 deletions
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<RadioMenuItem*>(&speed_items.back())->set_active ();