#include "pbd/error.h"
#include "pbd/replace_all.h"
+#include "ardour/boost_debug.h"
+#include "ardour/session.h"
+#include "ardour/slavable.h"
#include "ardour/vca.h"
#include "ardour/vca_manager.h"
-#include "i18n.h"
+#include "pbd/i18n.h"
using namespace ARDOUR;
using namespace Glib::Threads;
}
boost::shared_ptr<VCA> vca = boost::shared_ptr<VCA> (new VCA (_session, num, name));
+ BOOST_MARK_VCA (vca);
vca->init ();
VCAAdded (vcal); /* EMIT SIGNAL */
+ _session.set_dirty ();
+
return 0;
}
_vcas.remove (vca);
}
- VCAList vcal;
- vcal.push_back (vca);
+ /* this should cause deassignment and deletion */
+
+ vca->DropReferences ();
- VCARemoved (vcal); /* EMIT SIGNAL */
+ _session.set_dirty ();
}
boost::shared_ptr<VCA>
-VCAManager::vca_by_number (uint32_t n) const
+VCAManager::vca_by_number (int32_t n) const
{
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, 0, X_("tobereset")));
+ BOOST_MARK_VCA (vca);
if (vca->init() || vca->set_state (**i, version)) {
error << _("Cannot set state of a VCA") << endmsg;
_vcas_loaded = true;
- VCAsLoaded (); /* EMIT SIGNAL */
VCAAdded (vcal); /* EMIT SIGNAL */
return 0;