mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-09 15:15:41 +01:00
add new TRX-only function for unusual global-record-enable semantics
This commit is contained in:
parent
9bfe716239
commit
ec0b7cc1da
2 changed files with 31 additions and 1 deletions
|
|
@ -1833,10 +1833,36 @@ ARDOUR_UI::transport_stop ()
|
|||
_session->request_stop (false, true);
|
||||
}
|
||||
|
||||
bool
|
||||
ARDOUR_UI::trx_record_enable_all_tracks ()
|
||||
{
|
||||
if (!_session) {
|
||||
return false;
|
||||
}
|
||||
|
||||
boost::shared_ptr<RouteList> rl = _session->get_tracks ();
|
||||
bool none_record_enabled = true;
|
||||
|
||||
for (RouteList::iterator r = rl->begin(); r != rl->end(); ++r) {
|
||||
boost::shared_ptr<Track> t = boost::dynamic_pointer_cast<Track> (*r);
|
||||
assert (t);
|
||||
|
||||
if (t->record_enabled()) {
|
||||
none_record_enabled = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (none_record_enabled) {
|
||||
_session->set_record_enabled (rl, true, Session::rt_cleanup);
|
||||
}
|
||||
|
||||
return none_record_enabled;
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::transport_record (bool roll)
|
||||
{
|
||||
|
||||
if (_session) {
|
||||
switch (_session->record_status()) {
|
||||
case Session::Disabled:
|
||||
|
|
@ -1845,6 +1871,9 @@ ARDOUR_UI::transport_record (bool roll)
|
|||
msg.run ();
|
||||
return;
|
||||
}
|
||||
if (Profile->get_trx()) {
|
||||
roll = trx_record_enable_all_tracks ();
|
||||
}
|
||||
_session->maybe_enable_record ();
|
||||
if (roll) {
|
||||
transport_roll ();
|
||||
|
|
|
|||
|
|
@ -583,6 +583,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
void transport_rewind (int option);
|
||||
void transport_loop ();
|
||||
void toggle_roll (bool with_abort, bool roll_out_of_bounded_mode);
|
||||
bool trx_record_enable_all_tracks ();
|
||||
|
||||
bool _session_is_new;
|
||||
void set_session (ARDOUR::Session *);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue