Skip to content

Commit

Permalink
fix the last bug, envelope not being copied correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
osvein committed Nov 23, 2021
1 parent 5a2ead1 commit 1477295
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion synth.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

static void set_envelope(EnvelopeStep *dst, int dstlen, const EnvelopeStep *src) {
/* copy src to dst */
while (dstlen-- > 0 && src->duration) *dst++ = *src++;
while (src->duration && dstlen-- > 0) *dst++ = *src++;

/* pad remainder of dst with {0, 0} */
while (dstlen-- > 0) *dst++ = (EnvelopeStep){0, 0};
Expand Down

0 comments on commit 1477295

Please sign in to comment.