diff options
author | Robin Gareus <robin@gareus.org> | 2020-02-29 01:46:01 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-02-29 22:19:58 +0100 |
commit | 814af0f51c7a6db7f300bf8a6741667e6a278c13 (patch) | |
tree | 5b29470e11b853085d45777a712d5cbb6def7563 /libs | |
parent | 2b13cfa67cb5eb306f2dc6807ad242a4297775fd (diff) |
Fix off-by-one, start "Send" names at bitslot 1 (not 2)
Session::next_*_send_id() starts counting at bit 1.
Probably for historical reasons (bit zero = 1).
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/send.cc | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/libs/ardour/send.cc b/libs/ardour/send.cc index ce0cb2a5bf..3f1750be22 100644 --- a/libs/ardour/send.cc +++ b/libs/ardour/send.cc @@ -72,13 +72,14 @@ Send::name_and_id_new_send (Session& s, Role r, uint32_t& bitslot, bool ignore_b switch (r) { case Delivery::Aux: - return string_compose (_("aux %1"), (bitslot = s.next_aux_send_id ()) + 1); + return string_compose (_("aux %1"), (bitslot = s.next_aux_send_id ())); case Delivery::Listen: + bitslot = 0; /* unused */ return _("listen"); // no ports, no need for numbering case Delivery::Send: - return string_compose (_("send %1"), (bitslot = s.next_send_id ()) + 1); + return string_compose (_("send %1"), (bitslot = s.next_send_id ())); case Delivery::Foldback: - return string_compose (_("foldback %1"), (bitslot = s.next_aux_send_id ()) + 1); + return string_compose (_("foldback %1"), (bitslot = s.next_aux_send_id ())); default: fatal << string_compose (_("programming error: send created using role %1"), enum_2_string (r)) << endmsg; abort(); /*NOTREACHED*/ @@ -92,13 +93,6 @@ Send::Send (Session& s, boost::shared_ptr<Pannable> p, boost::shared_ptr<MuteMas , _metering (false) , _remove_on_disconnect (false) { - if (_role == Listen) { - /* we don't need to do this but it keeps things looking clean - in a debugger. _bitslot is not used by listen sends. - */ - _bitslot = 0; - } - //boost_debug_shared_ptr_mark_interesting (this, "send"); boost::shared_ptr<AutomationList> gl (new AutomationList (Evoral::Parameter (BusSendLevel))); |