diff options
Diffstat (limited to 'libs/ardour/vca_manager.cc')
-rw-r--r-- | libs/ardour/vca_manager.cc | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/libs/ardour/vca_manager.cc b/libs/ardour/vca_manager.cc index c8e3a009e4..9a96dc8a38 100644 --- a/libs/ardour/vca_manager.cc +++ b/libs/ardour/vca_manager.cc @@ -140,13 +140,18 @@ VCAManager::set_state (XMLNode const& node, int version) XMLNodeList const & children = node.children(); VCAList vcal; - { - - Mutex::Lock lm (lock); - - 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)); + 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)); + + /* can't hold the lock for the entire loop, + * because the new VCA maybe slaved and needs + * to call back into us to set up its own + * slave/master relationship + */ + + { + Mutex::Lock lm (lock); _vcas.push_back (vca); vcal.push_back (vca); } |