projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
19b56b0
)
aubioonset.c correct onset output when t-4<0
author
Paul Brossier
<piem@altern.org>
Tue, 29 Mar 2005 16:04:29 +0000
(16:04 +0000)
committer
Paul Brossier
<piem@altern.org>
Tue, 29 Mar 2005 16:04:29 +0000
(16:04 +0000)
thanks goes to Hamisch Allan for spotting this
examples/aubioonset.c
patch
|
blob
|
history
diff --git
a/examples/aubioonset.c
b/examples/aubioonset.c
index 40be246353841750b540e64d01ab5dfa155d18ff..4960298b2676bfaae8932f5ffff35d19782f841c 100644
(file)
--- a/
examples/aubioonset.c
+++ b/
examples/aubioonset.c
@@
-173,7
+173,11
@@
int main(int argc, char **argv) {
* delay to ensure the label is _before_ the
* actual onset */
if (isonset && output_filename == NULL) {
- outmsg("%f\n",(frames-4)*overlap_size/(float)samplerate);
+ if(frames >= 4) {
+ outmsg("%f\n",(frames-4)*overlap_size/(float)samplerate);
+ } else if (frames < 4) {
+ outmsg("%f\n",0.);
+ }
}
if (output_filename != NULL) {
file_write(fileout,overlap_size,obuf);