2 Copyright (C) 2016 Paul Davis
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License as published by the Free
6 Software Foundation; either version 2 of the License, or (at your option)
9 This program is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 You should have received a copy of the GNU General Public License along
15 with this program; if not, write to the Free Software Foundation, Inc.,
16 675 Mass Ave, Cambridge, MA 02139, USA.
19 #include "ardour/automation_control.h"
20 #include "ardour/gain_control.h"
21 #include "ardour/route.h"
22 #include "ardour/vca.h"
24 using namespace ARDOUR;
28 VCA::VCA (Session& s, const string& n)
29 : SessionHandleRef (s)
31 , _control (new GainControl (s, Evoral::Parameter (GainAutomation), boost::shared_ptr<AutomationList> ()))
36 VCA::set_value (double val, Controllable::GroupControlDisposition gcd)
38 _control->set_value (val, gcd);
42 VCA::get_value() const
44 return _control->get_value();
48 VCA::add (boost::shared_ptr<Route> r)
50 boost::dynamic_pointer_cast<GainControl>(r->gain_control())->add_master (_control);
54 VCA::remove (boost::shared_ptr<Route> r)
56 r->gain_control()->remove_master (_control);