diff options
author | Robin Gareus <robin@gareus.org> | 2017-02-28 04:59:45 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-02-28 05:01:17 +0100 |
commit | 5c4a2025f12038ef52efaedf8e71a22d9bae8215 (patch) | |
tree | 7efcc403b062ea641d90f3e732cc79dfde84e583 /gtk2_ardour/route_ui.cc | |
parent | 1071c0e788cb8b87d9fd034862892bd30ab26ab6 (diff) |
Fix touching mute automation (mostly)
controllable->set_value() from GUI context will eventually queue
a session-rt command. By the time the realtime command runs, the
controllable needs to be in "touch" mode.
The AutomationController "toggle" UI worked around this by directly using
the underlying API (ignoring slaved-controls and ignoring groups).
The RouteUI's GUI wasn't able to write mute-automation at all.
This commit is a compromise: press + hold (touch) + release button.
(it may need further special-casing for _desc.toggled in
AutomationControl::actually_set_value(), also undoing automation-writes
is currently not working correctly)
Diffstat (limited to 'gtk2_ardour/route_ui.cc')
-rw-r--r-- | gtk2_ardour/route_ui.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc index 0e1a047833..1802425a5a 100644 --- a/gtk2_ardour/route_ui.cc +++ b/gtk2_ardour/route_ui.cc @@ -492,6 +492,8 @@ RouteUI::mute_press (GdkEventButton* ev) _mute_release->routes = rl; } + boost::shared_ptr<MuteControl> mc = _route->mute_control(); + mc->start_touch (_session->audible_frame ()); _session->set_controls (route_list_to_control_list (rl, &Stripable::mute_control), _route->muted_by_self() ? 0.0 : 1.0, Controllable::InverseGroup); } @@ -506,7 +508,9 @@ RouteUI::mute_press (GdkEventButton* ev) _mute_release->routes = rl; } - _route->mute_control()->set_value (!_route->muted_by_self(), Controllable::UseGroup); + boost::shared_ptr<MuteControl> mc = _route->mute_control(); + mc->start_touch (_session->audible_frame ()); + mc->set_value (!_route->muted_by_self(), Controllable::UseGroup); } } } @@ -523,6 +527,8 @@ RouteUI::mute_release (GdkEventButton* /*ev*/) _mute_release = 0; } + _route->mute_control()->stop_touch (false, _session->audible_frame ()); + return false; } |