From: Paul Brossier Date: Thu, 20 Dec 2018 18:05:29 +0000 (+0100) Subject: [source_sndfile] use padding helpers X-Git-Tag: 0.4.9~61 X-Git-Url: https://git.aubio.org/?p=aubio.git;a=commitdiff_plain;h=7dea72fcd306af951324421ed981464cdfa71fa2 [source_sndfile] use padding helpers --- diff --git a/src/io/source_sndfile.c b/src/io/source_sndfile.c index 62712cb2..606ff1b9 100644 --- a/src/io/source_sndfile.c +++ b/src/io/source_sndfile.c @@ -205,11 +205,7 @@ void aubio_source_sndfile_do(aubio_source_sndfile_t * s, fvec_t * read_data, uin *read = (int)FLOOR(s->ratio * length + .5); - if (*read < read_data->length) { - for (j = *read; j < read_data->length; j++) { - read_data->data[j] = 0; - } - } + aubio_source_pad_output (read_data, *read); } @@ -257,14 +253,7 @@ void aubio_source_sndfile_do_multi(aubio_source_sndfile_t * s, fmat_t * read_dat *read = (int)FLOOR(s->ratio * length + .5); - if (*read < read_data->length) { - for (i = 0; i < read_data->height; i++) { - for (j = *read; j < read_data->length; j++) { - read_data->data[i][j] = 0.; - } - } - } - + aubio_source_pad_multi_output(read_data, input_channels, *read); } uint_t aubio_source_sndfile_get_samplerate(aubio_source_sndfile_t * s) {