use Session::request_roll() instead of request_transport_speed (1.0, ...)
This commit is contained in:
parent
52b7e68102
commit
48e5607f7c
@ -314,7 +314,7 @@ Editor::mouse_mode_toggled (MouseMode m)
|
||||
/* stop transport and reset default speed to avoid oddness with
|
||||
auditioning */
|
||||
_session->request_stop ();
|
||||
_session->request_transport_speed (1.0);
|
||||
_session->reset_transport_speed ();
|
||||
}
|
||||
|
||||
const bool was_internal = internal_editing();
|
||||
|
@ -302,9 +302,7 @@ ShuttleControl::on_button_press_event (GdkEventButton* ev)
|
||||
switch (ev->button) {
|
||||
case 1:
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) {
|
||||
if (_session->transport_rolling()) {
|
||||
_session->reset_transport_speed ();
|
||||
}
|
||||
_session->reset_transport_speed ();
|
||||
} else {
|
||||
add_modal_grab ();
|
||||
shuttle_grabbed = true;
|
||||
@ -319,6 +317,7 @@ ShuttleControl::on_button_press_event (GdkEventButton* ev)
|
||||
|
||||
case 2:
|
||||
case 3:
|
||||
default:
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
@ -349,11 +348,6 @@ ShuttleControl::on_button_release_event (GdkEventButton* ev)
|
||||
return true;
|
||||
|
||||
case 2:
|
||||
if (_session->transport_rolling()) {
|
||||
_session->request_transport_speed (1.0, Config->get_shuttle_behaviour() == Wheel);
|
||||
}
|
||||
return true;
|
||||
|
||||
case 3:
|
||||
default:
|
||||
return true;
|
||||
|
@ -273,7 +273,7 @@ main (int argc, char* argv[])
|
||||
signal (SIGTERM, wearedone);
|
||||
#endif
|
||||
|
||||
s->request_transport_speed (1.0);
|
||||
s->request_roll ();
|
||||
|
||||
char msg;
|
||||
do {
|
||||
|
@ -99,7 +99,7 @@ void
|
||||
Session::spp_start ()
|
||||
{
|
||||
if (Config->get_mmc_control ()) {
|
||||
request_transport_speed (1.0);
|
||||
request_roll (TRS_MIDIClock);
|
||||
}
|
||||
}
|
||||
|
||||
@ -121,7 +121,7 @@ void
|
||||
Session::mmc_deferred_play (MIDI::MachineControl &/*mmc*/)
|
||||
{
|
||||
if (Config->get_mmc_control ()) {
|
||||
request_transport_speed (1.0);
|
||||
request_roll (TRS_MMC);
|
||||
}
|
||||
}
|
||||
|
||||
@ -154,7 +154,7 @@ Session::mmc_record_strobe (MIDI::MachineControl &/*mmc*/)
|
||||
g_atomic_int_set (&_record_status, Enabled);
|
||||
RecordStateChanged (); /* EMIT SIGNAL */
|
||||
|
||||
request_transport_speed (1.0);
|
||||
request_roll (TRS_MMC);
|
||||
|
||||
} else {
|
||||
|
||||
|
@ -189,12 +189,14 @@ void
|
||||
BasicUI::rewind ()
|
||||
{
|
||||
session->request_transport_speed (get_transport_speed() - 1.5, false);
|
||||
session->request_roll ();
|
||||
}
|
||||
|
||||
void
|
||||
BasicUI::ffwd ()
|
||||
{
|
||||
session->request_transport_speed (get_transport_speed() + 1.5, false);
|
||||
session->request_roll ();
|
||||
}
|
||||
|
||||
void
|
||||
@ -588,7 +590,7 @@ BasicUI::toggle_roll (bool roll_out_of_bounded_mode)
|
||||
if (session->get_play_loop() && Config->get_loop_is_mode()) {
|
||||
session->request_locate (session->locations()->auto_loop_location()->start(), MustRoll);
|
||||
} else {
|
||||
session->request_transport_speed (1.0f);
|
||||
session->request_roll (TRS_UI);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ FaderPort8::button_play ()
|
||||
{
|
||||
if (transport_rolling ()) {
|
||||
if (get_transport_speed() != 1.0) {
|
||||
session->request_transport_speed (1.0);
|
||||
session->request_roll (TRS_UI);
|
||||
} else {
|
||||
transport_stop ();
|
||||
}
|
||||
@ -316,13 +316,15 @@ FaderPort8::button_varispeed (bool ffw)
|
||||
// switch play direction, if needed
|
||||
if (ffw) {
|
||||
if (get_transport_speed() <= 0) {
|
||||
session->request_transport_speed (1.0);
|
||||
session->request_transport_speed (1.0, false);
|
||||
session->request_roll (TRS_UI);
|
||||
return ;
|
||||
}
|
||||
} else {
|
||||
if (get_transport_speed() >= 0) {
|
||||
session->request_transport_speed (-1.0);
|
||||
return ;
|
||||
session->request_transport_speed (-1.0, false);
|
||||
session->request_roll (TRS_UI);
|
||||
return;
|
||||
}
|
||||
}
|
||||
// incrementally increase speed by semitones
|
||||
@ -331,6 +333,7 @@ FaderPort8::button_varispeed (bool ffw)
|
||||
float speed = exp2f(1.0/12.0) * get_transport_speed();
|
||||
speed = std::max (-maxspeed, std::min (maxspeed, speed));
|
||||
session->request_transport_speed (speed, false);
|
||||
session->request_roll (TRS_UI);
|
||||
}
|
||||
|
||||
#ifdef FP8_MUTESOLO_UNDO
|
||||
|
@ -1718,6 +1718,7 @@ TranzportControlProtocol::shuttle ()
|
||||
session->request_transport_speed_nonzero (get_transport_speed() - 0.1);
|
||||
}
|
||||
}
|
||||
session->request_roll ();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1305,7 +1305,7 @@ OSC::osc_toggle_roll (bool ret2strt)
|
||||
if (session->get_play_loop() && Config->get_loop_is_mode()) {
|
||||
session->request_locate (session->locations()->auto_loop_location()->start(), MustRoll);
|
||||
} else {
|
||||
session->request_transport_speed (1.0f);
|
||||
session->request_roll (TRS_UI);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
@ -199,4 +199,5 @@ TranzportControlProtocol::shuttle ()
|
||||
session->request_transport_speed_nonzero (get_transport_speed() - 0.1);
|
||||
}
|
||||
}
|
||||
session->request_roll ();
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ function factory ()
|
||||
-- event at 09:30:00 UTC (here: rec-arm + roll)
|
||||
if (now >= hhmmss (09, 30, 00) and _last_time < hhmmss (09, 30, 00)) then
|
||||
Session:maybe_enable_record (false)
|
||||
Session:request_transport_speed (1.0, true, ARDOUR.TransportRequestSource.TRS_UI)
|
||||
Session:request_roll (ARDOUR.TransportRequestSource.TRS_UI)
|
||||
end
|
||||
|
||||
-- event at 09:32:00 UTC (here: rec-stop)
|
||||
|
@ -26,7 +26,7 @@ function factory ()
|
||||
-- maybe-enable may fail if there are no tracks or step-entry is active
|
||||
-- roll transport if record-enable suceeded:
|
||||
if ARDOUR.Session.RecordState.Enabled == Session:record_status() then
|
||||
Session:request_transport_speed (1.0, true, ARDOUR.TransportRequestSource.TRS_UI) -- ...and go.
|
||||
Session:request_roll (ARDOUR.TransportRequestSource.TRS_UI) -- ...and go.
|
||||
end
|
||||
return
|
||||
end
|
||||
|
@ -44,7 +44,7 @@ function dsp_runmap (bufs, in_map, out_map, n_samples, offset)
|
||||
if b ~= ARDOUR.ChanMapping.Invalid then -- check if channel is mapped
|
||||
local a = ARDOUR.DSP.compute_peak(bufs:get_audio(b):data(offset), n_samples, 0) -- compute digital peak
|
||||
if a > threshold then
|
||||
Session:request_transport_speed (1.0, true, ARDOUR.TransportRequestSource.TRS_UI)
|
||||
Session:request_roll (ARDOUR.TransportRequestSource.TRS_UI)
|
||||
end
|
||||
if a > level then level = a end -- max level of all channels
|
||||
end
|
||||
|
@ -20,7 +20,7 @@ ARDOUR.LuaAPI.usleep (100000)
|
||||
s:goto_start()
|
||||
s:maybe_enable_record()
|
||||
|
||||
s:request_transport_speed(1.0, true, 4)
|
||||
s:request_roll (4)
|
||||
ARDOUR.LuaAPI.usleep (1000000 * reclen)
|
||||
s:request_stop (false, false, 4);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user