diff options
Diffstat (limited to 'libs')
-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) */ |