-Send::Send (Session& s, boost::shared_ptr<MuteMaster> mm, Role r)
- : Delivery (s, mm, string_compose (_("send %1"), (_bitslot = s.next_send_id()) + 1), r)
+PBD::Signal0<void> Send::ChangedLatency;
+
+string
+Send::name_and_id_new_send (Session& s, Role r, uint32_t& bitslot, bool ignore_bitslot)
+{
+ if (ignore_bitslot) {
+ /* this happens during initial construction of sends from XML,
+ before they get ::set_state() called. lets not worry about
+ it.
+ */
+ bitslot = 0;
+ return string ();
+ }
+
+ switch (r) {
+ case Delivery::Aux:
+ return string_compose (_("aux %1"), (bitslot = s.next_aux_send_id ()) + 1);
+ case Delivery::Listen:
+ return _("listen"); // no ports, no need for numbering
+ case Delivery::Send:
+ return string_compose (_("send %1"), (bitslot = s.next_send_id ()) + 1);
+ case Delivery::Foldback:
+ return string_compose (_("foldback %1"), (bitslot = s.next_aux_send_id ()) + 1);
+ default:
+ fatal << string_compose (_("programming error: send created using role %1"), enum_2_string (r)) << endmsg;
+ abort(); /*NOTREACHED*/
+ return string();
+ }
+
+}
+
+Send::Send (Session& s, boost::shared_ptr<Pannable> p, boost::shared_ptr<MuteMaster> mm, Role r, bool ignore_bitslot)
+ : Delivery (s, p, mm, name_and_id_new_send (s, r, _bitslot, ignore_bitslot), r)