projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
21234ee
)
src/io/source_sndfile.c: fix resampled position in _seek
author
Paul Brossier
<piem@piem.org>
Thu, 19 Dec 2013 22:03:57 +0000
(17:03 -0500)
committer
Paul Brossier
<piem@piem.org>
Thu, 19 Dec 2013 22:03:57 +0000
(17:03 -0500)
src/io/source_sndfile.c
patch
|
blob
|
history
diff --git
a/src/io/source_sndfile.c
b/src/io/source_sndfile.c
index
0fa7fc5
..
359ab79
100644
(file)
--- a/
src/io/source_sndfile.c
+++ b/
src/io/source_sndfile.c
@@
-263,7
+263,7
@@
uint_t aubio_source_sndfile_get_channels(aubio_source_sndfile_t * s) {
}
uint_t aubio_source_sndfile_seek (aubio_source_sndfile_t * s, uint_t pos) {
- uint_t resampled_pos = (uint_t)ROUND(pos * s->
input_samplerate * 1. / s->samplerate
);
+ uint_t resampled_pos = (uint_t)ROUND(pos * s->
ratio
);
return sf_seek (s->handle, resampled_pos, SEEK_SET);
}