13
0

Do not allow to de/activate a track while the transport is rolling.

roll_delay and latency are only re-calculated when the transport is stopped.
de/activating a track is also not RT-safe.
This commit is contained in:
Robin Gareus 2014-06-22 23:16:32 +02:00
parent b46652c3c9
commit 14c6dfab07
3 changed files with 6 additions and 0 deletions

View File

@ -1526,6 +1526,7 @@ MixerStrip::build_route_ops_menu ()
items.push_back (CheckMenuElem (_("Active"))); items.push_back (CheckMenuElem (_("Active")));
Gtk::CheckMenuItem* i = dynamic_cast<Gtk::CheckMenuItem *> (&items.back()); Gtk::CheckMenuItem* i = dynamic_cast<Gtk::CheckMenuItem *> (&items.back());
i->set_active (_route->active()); i->set_active (_route->active());
i->set_sensitive(! _session->transport_rolling());
i->signal_activate().connect (sigc::bind (sigc::mem_fun (*this, &RouteUI::set_route_active), !_route->active(), false)); i->signal_activate().connect (sigc::bind (sigc::mem_fun (*this, &RouteUI::set_route_active), !_route->active(), false));
items.push_back (SeparatorElem()); items.push_back (SeparatorElem());

View File

@ -710,6 +710,7 @@ RouteTimeAxisView::build_display_menu ()
} else if (active > 0 && inactive > 0) { } else if (active > 0 && inactive > 0) {
i->set_inconsistent (true); i->set_inconsistent (true);
} }
i->set_sensitive(! _session->transport_rolling());
i->signal_activate().connect (sigc::bind (sigc::mem_fun (*this, &RouteUI::set_route_active), click_sets_active, true)); i->signal_activate().connect (sigc::bind (sigc::mem_fun (*this, &RouteUI::set_route_active), click_sets_active, true));
items.push_back (SeparatorElem()); items.push_back (SeparatorElem());

View File

@ -3694,6 +3694,10 @@ Route::denormal_protection () const
void void
Route::set_active (bool yn, void* src) Route::set_active (bool yn, void* src)
{ {
if (_session.transport_rolling()) {
return;
}
if (_route_group && src != _route_group && _route_group->is_active() && _route_group->is_route_active()) { if (_route_group && src != _route_group && _route_group->is_active() && _route_group->is_route_active()) {
_route_group->foreach_route (boost::bind (&Route::set_active, _1, yn, _route_group)); _route_group->foreach_route (boost::bind (&Route::set_active, _1, yn, _route_group));
return; return;