projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f22ed5
)
[io] source_pad_do_output to pad extra channels
author
Paul Brossier
<piem@piem.org>
Thu, 20 Dec 2018 18:17:58 +0000
(19:17 +0100)
committer
Paul Brossier
<piem@piem.org>
Thu, 20 Dec 2018 18:17:58 +0000
(19:17 +0100)
src/io/ioutils.c
patch
|
blob
|
history
diff --git
a/src/io/ioutils.c
b/src/io/ioutils.c
index
55f7c4f
..
3427cd1
100644
(file)
--- a/
src/io/ioutils.c
+++ b/
src/io/ioutils.c
@@
-111,6
+111,15
@@
aubio_source_pad_multi_output (fmat_t *read_data,
read_data->length - source_read);
}
}
+
+ // destination matrix has more channels than the file
+ // copy channels from the source to extra output channels
+ if (read_data->height > source_channels) {
+ for (i = source_channels; i < read_data->height; i++) {
+ AUBIO_MEMCPY(read_data->data[i], read_data->data[i % source_channels],
+ sizeof(smpl_t) * read_data->length);
+ }
+ }
}
uint_t