projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5a2a6c6
)
src/onset/onset.c: avoid doubled onset at start
author
Paul Brossier
<piem@piem.org>
Sun, 24 Aug 2014 14:32:58 +0000
(09:32 -0500)
committer
Paul Brossier
<piem@piem.org>
Sun, 24 Aug 2014 14:32:58 +0000
(09:32 -0500)
src/onset/onset.c
patch
|
blob
|
history
diff --git
a/src/onset/onset.c
b/src/onset/onset.c
index
115f4c6
..
04002ff
100644
(file)
--- a/
src/onset/onset.c
+++ b/
src/onset/onset.c
@@
-68,7
+68,7
@@
void aubio_onset_do (aubio_onset_t *o, fvec_t * input, fvec_t * onset)
}
} else {
// we are at the beginning of the file, and we don't find silence
- if (o->total_frames
== 0
&& aubio_silence_detection(input, o->silence) == 0) {
+ if (o->total_frames
<= o->delay && o->last_onset < o ->minioi
&& aubio_silence_detection(input, o->silence) == 0) {
//AUBIO_DBG ("beginning of file is not silent, marking as onset\n");
isonset = o->delay / o->hop_size;
o->last_onset = o->delay;