projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2a94eca
)
[source_sndfile] use padding helpers
author
Paul Brossier
<piem@piem.org>
Thu, 20 Dec 2018 18:05:29 +0000
(19:05 +0100)
committer
Paul Brossier
<piem@piem.org>
Thu, 20 Dec 2018 18:05:29 +0000
(19:05 +0100)
src/io/source_sndfile.c
patch
|
blob
|
history
diff --git
a/src/io/source_sndfile.c
b/src/io/source_sndfile.c
index
62712cb
..
606ff1b
100644
(file)
--- 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);
*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);
*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) {
}
uint_t aubio_source_sndfile_get_samplerate(aubio_source_sndfile_t * s) {