Skip to content

Commit

Permalink
Preserve LFO range when other segments change loop
Browse files Browse the repository at this point in the history
  • Loading branch information
qiemem committed Jul 28, 2020
1 parent 630e897 commit 881bbcd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions stages/chain_state.cc
Original file line number Diff line number Diff line change
Expand Up @@ -541,10 +541,12 @@ void ChainState::HandleRequest(Settings* settings) {
new_loop_bit = 0x4;
}
}
s->segment_configuration[i] &= ~0xff00; // Reset LFO range
s->segment_configuration[i] &= ~0b00000100; // Reset loop bits
s->segment_configuration[i] |= new_loop_bit; // Set new loop bit
dirty |= new_loop_bit != loop_bit;
if (new_loop_bit != loop_bit) {
s->segment_configuration[i] &= ~0xff00; // Reset LFO range
dirty = true;
}
}
}

Expand Down

0 comments on commit 881bbcd

Please sign in to comment.