From ed1bbefd193be8a21eb4436442ee7acf49c858a2 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 29 Nov 2014 01:25:27 -0500 Subject: Somewhat working gain automation. This probably isn't correct in several ways, but it works more than it did, so I figure it's push worthy. Still not working: * Saving mute automation list * Dragged control points are not snapped to model restrictions (boolean, in this case, but general problem) * Line goes funny if you record mute automation (as opposed to drawing it which works) --- libs/ardour/audio_track.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libs/ardour/audio_track.cc') diff --git a/libs/ardour/audio_track.cc b/libs/ardour/audio_track.cc index 13d5c43dda..c458668e18 100644 --- a/libs/ardour/audio_track.cc +++ b/libs/ardour/audio_track.cc @@ -350,6 +350,16 @@ AudioTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_fram return dret; } + if (_mute_control->list() && _mute_control->automation_playback()) { + bool valid = false; + const float mute = _mute_control->list()->rt_safe_eval(transport_frame, valid); + if (mute >= 0.5 && !muted()) { + _mute_control->set_value(1.0); // mute + } else if (mute < 0.5 && muted()) { + _mute_control->set_value(0.0); // unmute + } + } + _silent = false; _amp->apply_gain_automation(false); -- cgit v1.2.3