Skip to content

Commit

Permalink
Restart loop index when BPM changes
Browse files Browse the repository at this point in the history
  • Loading branch information
devcurmudgeon committed Aug 19, 2018
1 parent acb34bf commit 94fcb2b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions source/alo.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ update_position(Alo* self, const LV2_Atom_Object* obj)
self->bpm = ((LV2_Atom_Float*)bpm)->body;
self->loop_beats = 4 * (uint32_t)floorf(*(self->ports.bars));
self->loop_samples = self->loop_beats * self->rate * 60.0f / self->bpm;
self->loop_index = 0;
log("BPM: %G", self->bpm);
log("Loop_samples: %d", self->loop_samples);
for (int i = 0; i < NUM_LOOPS; i++) {
Expand Down

0 comments on commit 94fcb2b

Please sign in to comment.