From: Paul Brossier Date: Sat, 23 Mar 2013 00:11:35 +0000 (-0500) Subject: src/synth/sampler.c: fix _do_multi X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=eaaba627e15400faa1b83b05a184ea885710d5c3;p=aubio.git src/synth/sampler.c: fix _do_multi --- diff --git a/src/synth/sampler.c b/src/synth/sampler.c index bbacf46f..e6ee809a 100644 --- a/src/synth/sampler.c +++ b/src/synth/sampler.c @@ -82,10 +82,10 @@ void aubio_sampler_do_multi ( aubio_sampler_t * o, fmat_t * input, fmat_t * outp aubio_source_do_multi (o->source, o->source_output_multi, &read); for (i = 0; i < output->height; i++) { for (j = 0; j < output->length; j++) { - output->data[i][j] = o->source_output_multi->data[i][j]; + output->data[i][j] += o->source_output_multi->data[i][j]; } } - if (read == 0) o->playing = 0; + if ( read < o->blocksize ) o->playing = 0; } if (input && input != output) { for (i = 0; i < output->height; i++) {