projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
832b0f6
)
[tempo] fix delay_ms methods
author
Paul Brossier
<piem@piem.org>
Sat, 24 Nov 2018 17:31:42 +0000
(18:31 +0100)
committer
Paul Brossier
<piem@piem.org>
Sat, 24 Nov 2018 17:31:42 +0000
(18:31 +0100)
src/tempo/tempo.c
patch
|
blob
|
history
diff --git
a/src/tempo/tempo.c
b/src/tempo/tempo.c
index
4b91c9d
..
5698b2b
100644
(file)
--- a/
src/tempo/tempo.c
+++ b/
src/tempo/tempo.c
@@
-128,8
+128,7
@@
uint_t aubio_tempo_set_delay_s(aubio_tempo_t * o, smpl_t delay) {
}
uint_t aubio_tempo_set_delay_ms(aubio_tempo_t * o, smpl_t delay) {
}
uint_t aubio_tempo_set_delay_ms(aubio_tempo_t * o, smpl_t delay) {
- o->delay = 1000. * delay * o->samplerate;
- return AUBIO_OK;
+ return aubio_tempo_set_delay_s(o, delay / 1000.);
}
uint_t aubio_tempo_get_delay(aubio_tempo_t * o) {
}
uint_t aubio_tempo_get_delay(aubio_tempo_t * o) {
@@
-141,7
+140,7
@@
smpl_t aubio_tempo_get_delay_s(aubio_tempo_t * o) {
}
smpl_t aubio_tempo_get_delay_ms(aubio_tempo_t * o) {
}
smpl_t aubio_tempo_get_delay_ms(aubio_tempo_t * o) {
- return
o->delay / (smpl_t)(o->samplerate) /
1000.;
+ return
aubio_tempo_get_delay_s(o) *
1000.;
}
uint_t aubio_tempo_set_silence(aubio_tempo_t * o, smpl_t silence) {
}
uint_t aubio_tempo_set_silence(aubio_tempo_t * o, smpl_t silence) {