mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-11 00:56:33 +01:00
Factor away duplicated ARDOUR_UI::transport_roll() body
This commit is contained in:
parent
3d82eb1afd
commit
852d8de563
1 changed files with 1 additions and 36 deletions
|
|
@ -1803,42 +1803,7 @@ ARDOUR_UI::transport_roll ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_session->is_auditioning()) {
|
_controller.transport_play ();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_session->config.get_external_sync()) {
|
|
||||||
switch (TransportMasterManager::instance().current()->type()) {
|
|
||||||
case Engine:
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
/* transport controlled by the master */
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool rolling = _session->transport_rolling();
|
|
||||||
|
|
||||||
if (_session->get_play_loop()) {
|
|
||||||
|
|
||||||
/* If loop playback is not a mode, then we should cancel
|
|
||||||
it when this action is requested. If it is a mode
|
|
||||||
we just leave it in place.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (!Config->get_loop_is_mode()) {
|
|
||||||
/* stop loop playback but keep transport state */
|
|
||||||
_session->request_play_loop (false, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
} else if (_session->get_play_range () ) {
|
|
||||||
/* stop playing a range if we currently are */
|
|
||||||
_session->request_play_range (0, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!rolling) {
|
|
||||||
_session->request_roll ();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue