Fix deadlock in loading + configurable steps count
This commit is contained in:
+3
-3
@@ -47,7 +47,7 @@ static void handlePlayback() {
|
||||
for(int t=0; t<NUM_TRACKS; t++) {
|
||||
int trackChannel = midiChannels[t];
|
||||
int nextStep = playbackStep + 1;
|
||||
if (nextStep >= NUM_STEPS) nextStep = 0;
|
||||
if (nextStep >= numSteps) nextStep = 0;
|
||||
|
||||
// Determine if we are tying to the next note
|
||||
bool isTied = local_sequence[t][playbackStep].tie && (local_sequence[t][nextStep].note != -1);
|
||||
@@ -60,7 +60,7 @@ static void handlePlayback() {
|
||||
}
|
||||
|
||||
playbackStep++;
|
||||
if (playbackStep >= NUM_STEPS) {
|
||||
if (playbackStep >= numSteps) {
|
||||
playbackStep = 0;
|
||||
|
||||
// Theme change
|
||||
@@ -117,7 +117,7 @@ static void handlePlayback() {
|
||||
midi.sendNoteOn(local_sequence[t][playbackStep].note, velocity, trackChannel);
|
||||
}
|
||||
|
||||
int prevStep = (playbackStep == 0) ? NUM_STEPS - 1 : playbackStep - 1;
|
||||
int prevStep = (playbackStep == 0) ? numSteps - 1 : playbackStep - 1;
|
||||
bool wasTied = local_sequence[t][prevStep].tie && (local_sequence[t][playbackStep].note != -1);
|
||||
int prevNote = local_sequence[t][prevStep].note;
|
||||
// Note Off for previous step (if tied - delayed Note Off)
|
||||
|
||||
Reference in New Issue
Block a user