projects
/
aubio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
examples/aubioonset.c: avoid saturation in when using --mix-input
[aubio.git]
/
examples
/
aubioonset.c
diff --git
a/examples/aubioonset.c
b/examples/aubioonset.c
index
032eb00
..
680471c
100644
(file)
--- a/
examples/aubioonset.c
+++ b/
examples/aubioonset.c
@@
-43,10
+43,12
@@
void process_block(fvec_t *ibuf, fvec_t *obuf)
} else {
aubio_wavetable_stop ( wavetable );
}
- if (mix_input)
+ if (mix_input)
{
aubio_wavetable_do (wavetable, ibuf, obuf);
- else
+ fvec_clamp(obuf, 1.);
+ } else {
aubio_wavetable_do (wavetable, obuf, obuf);
+ }
}
void process_print (void)