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.
This commit is contained in:
parent
ea30642ae3
commit
b84c99639f
|
@ -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 ();
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue