Stop sends and inserts from re-registering their own ID when set_state() is called

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@1910 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Sampo Savolainen 2007-05-22 19:26:37 +00:00
parent 879d64ea1f
commit 22cfe21abd
2 changed files with 13 additions and 2 deletions

View file

@ -860,6 +860,7 @@ PortInsert::init ()
PortInsert::PortInsert (Session& s, const XMLNode& node)
: Insert (s, "will change", PreFader)
{
bitslot = 0xffffffff;
if (set_state (node)) {
throw failed_constructor();
}
@ -943,8 +944,12 @@ PortInsert::set_state(const XMLNode& node)
if ((prop = node.property ("bitslot")) == 0) {
bitslot = _session.next_insert_id();
} else {
uint32_t old_bitslot = bitslot;
sscanf (prop->value().c_str(), "%" PRIu32, &bitslot);
_session.mark_insert_id (bitslot);
if (old_bitslot != bitslot) {
_session.mark_insert_id (bitslot);
}
}
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {

View file

@ -44,6 +44,8 @@ Send::Send (Session& s, const XMLNode& node)
_metering = false;
expected_inputs = 0;
bitslot = 0xffffffff;
if (set_state (node)) {
throw failed_constructor();
}
@ -92,8 +94,12 @@ Send::set_state(const XMLNode& node)
if ((prop = node.property ("bitslot")) == 0) {
bitslot = _session.next_send_id();
} else {
uint32_t old_bitslot = bitslot;
sscanf (prop->value().c_str(), "%" PRIu32, &bitslot);
_session.mark_send_id (bitslot);
if (bitslot != old_bitslot) {
_session.mark_send_id (bitslot);
}
}
/* Send has regular IO automation (gain, pan) */