diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-03-07 14:59:40 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-05-31 15:30:39 -0400 |
commit | 1f6800d421fc41e6797e0bc3b6e78a6e07e97120 (patch) | |
tree | a08ec9f91927f3f0c438e4b749b351a146ebc92f /libs/ardour/vca_manager.cc | |
parent | a03d969a978126d72f0825096d9d9ec89816a0d9 (diff) |
redesign Route and VCA objects to inherit from ARDOUR::Stripable
Diffstat (limited to 'libs/ardour/vca_manager.cc')
-rw-r--r-- | libs/ardour/vca_manager.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libs/ardour/vca_manager.cc b/libs/ardour/vca_manager.cc index 71c3fe8029..6cc287554a 100644 --- a/libs/ardour/vca_manager.cc +++ b/libs/ardour/vca_manager.cc @@ -18,6 +18,7 @@ */ #include "pbd/convert.h" +#include "pbd/error.h" #include "pbd/replace_all.h" #include "ardour/vca.h" @@ -27,6 +28,7 @@ using namespace ARDOUR; using namespace Glib::Threads; +using namespace PBD; using std::string; string VCAManager::xml_node_name (X_("VCAManager")); @@ -76,6 +78,8 @@ VCAManager::create_vca (uint32_t howmany, std::string const & name_template) boost::shared_ptr<VCA> vca = boost::shared_ptr<VCA> (new VCA (_session, num, name)); + vca->init (); + _vcas.push_back (vca); vcal.push_back (vca); } @@ -145,7 +149,12 @@ VCAManager::set_state (XMLNode const& node, int version) for (XMLNodeList::const_iterator i = children.begin(); i != children.end(); ++i) { if ((*i)->name() == VCA::xml_node_name) { - boost::shared_ptr<VCA> vca = boost::shared_ptr<VCA> (new VCA (_session, **i, version)); + boost::shared_ptr<VCA> vca = boost::shared_ptr<VCA> (new VCA (_session, 0, X_("tobereset"))); + + if (vca->init() || vca->set_state (**i, version)) { + error << _("Cannot set state of a VCA") << endmsg; + return -1; + } /* can't hold the lock for the entire loop, * because the new VCA maybe slaved and needs |