summaryrefslogtreecommitdiff
path: root/libs/ardour/route.cc
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2015-09-22 03:20:39 +1000
committernick_m <mainsbridge@gmail.com>2015-10-20 00:53:27 +1100
commit877b258c74aa6e2fa737ca9112900dca8bce6628 (patch)
tree887dbf4c88b86e0238a318e7fec70b0fc5df9983 /libs/ardour/route.cc
parent5afb645c9fa6426ae2d5cf56ab20448eba9e91e0 (diff)
Toggled automation fixes.
- don't attempt to insert two points on toggle. - remove forced touch->write mode change on toggle - initial state still wrong, but works much better overall.
Diffstat (limited to 'libs/ardour/route.cc')
-rw-r--r--libs/ardour/route.cc16
1 files changed, 12 insertions, 4 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index c3b09df2d3..cb3f0d48c9 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -3900,7 +3900,16 @@ Route::MuteControllable::set_superficial_value(bool muted)
/* Note we can not use AutomationControl::set_value here since it will emit
Changed(), but the value will not be correct to the observer. */
- bool to_list = _list && ((AutomationList*)_list.get())->automation_write();
+ /* this is a tweak of ControlList::automation_write ()
+ as currently MuteControllable can't be touching.
+ bool to_list = _list && ((AutomationList*)_list.get())->automation_write();
+ */
+ const AutoState as = ((AutomationList*)_list.get())->automation_state ();
+ bool to_list = _list && _session.transport_rolling () && (as == Touch || as == Write);
+
+ if (to_list) {
+ _list->set_in_write_pass(true, false, _session.audible_frame ());
+ }
Control::set_double (muted, _session.transport_frame(), to_list);
}
@@ -3916,6 +3925,8 @@ Route::MuteControllable::set_value (double val)
}
if (_list && ((AutomationList*)_list.get())->automation_playback()) {
+ // Set superficial/automation value to drive controller (and possibly record)
+ set_superficial_value (bval);
// Playing back automation, set route mute directly
r->set_mute (bval, this);
} else {
@@ -3924,9 +3935,6 @@ Route::MuteControllable::set_value (double val)
rl->push_back (r);
_session.set_mute (rl, bval, Session::rt_cleanup);
}
-
- // Set superficial/automation value to drive controller (and possibly record)
- set_superficial_value(bval);
}
double