From 58c24e1a357d9a19af0ca2ae379b6ad85a42a83f Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Mon, 8 Apr 2013 16:17:29 -0500 Subject: [PATCH] src/io/source_sndfile.c: fix copy of last channel --- src/io/source_sndfile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/io/source_sndfile.c b/src/io/source_sndfile.c index 28b31d34..e6d99020 100644 --- a/src/io/source_sndfile.c +++ b/src/io/source_sndfile.c @@ -208,8 +208,8 @@ void aubio_source_sndfile_do_multi(aubio_source_sndfile_t * s, fmat_t * read_dat if (read_data->height > input_channels) { // copy last channel to all additional channels for (j = 0; j < read_samples / input_channels; j++) { - for (i = input_channels; i < read_to->height; i++) { - data[i][v] = s->scratch_data[ j * input_channels + (input_channels - 1)]; + for (i = input_channels; i < read_data->height; i++) { + data[i][j] = s->scratch_data[ j * input_channels + (input_channels - 1)]; } } } -- 2.26.2