LV2 support.
[ardour.git] / libs / ardour / send.cc
index 7888f89d412894b801196defc24762344aa4ea10..614195ac2d890659b1b8da6155910f7880f218c2 100644 (file)
@@ -15,7 +15,6 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-    $Id$
 */
 
 #include <algorithm>
@@ -45,6 +44,8 @@ Send::Send (Session& s, const XMLNode& node)
        _metering = false;
        expected_inputs = 0;
 
+       bitslot = 0xffffffff;
+
        if (set_state (node)) {
                throw failed_constructor();
        }
@@ -93,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) */