beat

Arrange audio samples into something bigger
git clone https://git.ce9e.org/beat.git

commit
ff8d39c401bc3ed046182c4760fba9e31181bdc5
parent
85bf9190b51a8861c591d6ca1b39f9cbc8ab8770
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2019-12-18 10:55
fix: account for empty buffers

Diffstat

M beat.c 2 +-

1 files changed, 1 insertions, 1 deletions


diff --git a/beat.c b/beat.c

@@ -89,7 +89,7 @@ int main(int argc, char **argv) {
   89    89         int beat = atoi(argv[i]);
   90    90         char *path = argv[i + 1];
   91    91 
   92    -1         if (beat * frames_per_beat >= (buf_cur + 1) * buf_len) {
   -1    92         while (beat * frames_per_beat >= (buf_cur + 1) * buf_len) {
   93    93             sf_writef_float(outfile, ctx.buf, buf_len);
   94    94             memset(ctx.buf, 0, buf_len * sizeof(float));
   95    95