summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-04-22 23:36:41 +0200
committerRobin Gareus <robin@gareus.org>2016-04-22 23:36:41 +0200
commitf719dcbd4311fa7e57b3905d4ecd61ce48c572f0 (patch)
tree0225e52be20c87dcc751a23983f759a53124f0ac /libs
parent5c41043a2d2578984746fa0082f8df6b8c3eecfd (diff)
fix send-id "0" when loading session
Send::set_state() unsets the current send-id before setting the new one, but by default _bitset defaults to zero. This may lead to unset an existing send "0"
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/session.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 1fcd219e95..b6cc258fa7 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -5491,7 +5491,7 @@ Session::next_insert_id ()
/* this doesn't really loop forever. just think about it */
while (true) {
- for (boost::dynamic_bitset<uint32_t>::size_type n = 0; n < insert_bitset.size(); ++n) {
+ for (boost::dynamic_bitset<uint32_t>::size_type n = 1; n < insert_bitset.size(); ++n) {
if (!insert_bitset[n]) {
insert_bitset[n] = true;
return n;
@@ -5511,7 +5511,7 @@ Session::next_send_id ()
/* this doesn't really loop forever. just think about it */
while (true) {
- for (boost::dynamic_bitset<uint32_t>::size_type n = 0; n < send_bitset.size(); ++n) {
+ for (boost::dynamic_bitset<uint32_t>::size_type n = 1; n < send_bitset.size(); ++n) {
if (!send_bitset[n]) {
send_bitset[n] = true;
return n;
@@ -5531,7 +5531,7 @@ Session::next_aux_send_id ()
/* this doesn't really loop forever. just think about it */
while (true) {
- for (boost::dynamic_bitset<uint32_t>::size_type n = 0; n < aux_send_bitset.size(); ++n) {
+ for (boost::dynamic_bitset<uint32_t>::size_type n = 1; n < aux_send_bitset.size(); ++n) {
if (!aux_send_bitset[n]) {
aux_send_bitset[n] = true;
return n;
@@ -5551,7 +5551,7 @@ Session::next_return_id ()
/* this doesn't really loop forever. just think about it */
while (true) {
- for (boost::dynamic_bitset<uint32_t>::size_type n = 0; n < return_bitset.size(); ++n) {
+ for (boost::dynamic_bitset<uint32_t>::size_type n = 1; n < return_bitset.size(); ++n) {
if (!return_bitset[n]) {
return_bitset[n] = true;
return n;