projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
691791e
)
src/io/source_sndfile.c: approximate duration when resampling
author
Paul Brossier
<piem@piem.org>
Mon, 25 Apr 2016 15:42:35 +0000
(17:42 +0200)
committer
Paul Brossier
<piem@piem.org>
Mon, 25 Apr 2016 15:42:35 +0000
(17:42 +0200)
src/io/source_sndfile.c
patch
|
blob
|
history
diff --git
a/src/io/source_sndfile.c
b/src/io/source_sndfile.c
index
00ea42a
..
5c8d5a5
100644
(file)
--- a/
src/io/source_sndfile.c
+++ b/
src/io/source_sndfile.c
@@
-140,6
+140,7
@@
aubio_source_sndfile_t * new_aubio_source_sndfile(const char_t * path, uint_t sa
AUBIO_WRN("source_sndfile: upsampling %s from %d to %d\n", s->path,
s->input_samplerate, s->samplerate);
}
+ s->duration = (uint_t)FLOOR(s->duration * s->ratio);
}
#else
if (s->ratio != 1) {