diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-02-29 14:44:25 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-05-31 15:30:38 -0400 |
commit | f44cac5cc60c0ad93da3a44db2517f09cc82f345 (patch) | |
tree | 1035815b0f93b2ae39fef15402f9a9e4ea87fb1e /libs/ardour/vca.cc | |
parent | 089549acb67e9f11039853eb5af48b00d206b7a5 (diff) |
expand and improve VCA API
Diffstat (limited to 'libs/ardour/vca.cc')
-rw-r--r-- | libs/ardour/vca.cc | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/libs/ardour/vca.cc b/libs/ardour/vca.cc index b49489dfe7..67ca4733cb 100644 --- a/libs/ardour/vca.cc +++ b/libs/ardour/vca.cc @@ -21,13 +21,31 @@ #include "ardour/route.h" #include "ardour/vca.h" +#include "i18n.h" + using namespace ARDOUR; using namespace PBD; using std::string; -VCA::VCA (Session& s, const string& n) +gint VCA::next_number = 0; + +string +VCA::default_name_template () +{ + return _("VCA %n"); +} + +int +VCA::next_vca_number () +{ + /* recall that atomic_int_add() returns the value before the add */ + return g_atomic_int_add (&next_number, 1) + 1; +} + +VCA::VCA (Session& s, const string& name, uint32_t num) : SessionHandleRef (s) - , _name (n) + , _number (num) + , _name (name) , _control (new GainControl (s, Evoral::Parameter (GainAutomation), boost::shared_ptr<AutomationList> ())) { } @@ -48,6 +66,7 @@ void VCA::add (boost::shared_ptr<Route> r) { boost::dynamic_pointer_cast<GainControl>(r->gain_control())->add_master (_control); + std::cerr << name() << " now controlling " << r->name() << std::endl; } void |