diff options
author | Sampo Savolainen <v2@iki.fi> | 2007-05-22 19:26:37 +0000 |
---|---|---|
committer | Sampo Savolainen <v2@iki.fi> | 2007-05-22 19:26:37 +0000 |
commit | 22cfe21abde9a55d36551147a05e30574f5e1fa5 (patch) | |
tree | e1a7f38a17249b223b6f107aa423bf2ccc21bc4c | |
parent | 879d64ea1f6863dc10cc3c9cb45583eaecc0556c (diff) |
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
-rw-r--r-- | libs/ardour/insert.cc | 7 | ||||
-rw-r--r-- | libs/ardour/send.cc | 8 |
2 files changed, 13 insertions, 2 deletions
diff --git a/libs/ardour/insert.cc b/libs/ardour/insert.cc index ccc73946b5..f8650c7ee1 100644 --- a/libs/ardour/insert.cc +++ b/libs/ardour/insert.cc @@ -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) { diff --git a/libs/ardour/send.cc b/libs/ardour/send.cc index faafa3295e..614195ac2d 100644 --- a/libs/ardour/send.cc +++ b/libs/ardour/send.cc @@ -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) */ |