summaryrefslogtreecommitdiff
path: root/libs/ardour/vca_manager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/vca_manager.cc')
-rw-r--r--libs/ardour/vca_manager.cc11
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