From eaaba627e15400faa1b83b05a184ea885710d5c3 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Fri, 22 Mar 2013 19:11:35 -0500 Subject: [PATCH] src/synth/sampler.c: fix _do_multi --- src/synth/sampler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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++) { -- 2.26.2