[examples] remove unneeded cast
[aubio.git] / examples / aubioonset.c
index 680471c..ca3496b 100644 (file)
@@ -45,7 +45,6 @@ void process_block(fvec_t *ibuf, fvec_t *obuf)
   }
   if (mix_input) {
     aubio_wavetable_do (wavetable, ibuf, obuf);
-    fvec_clamp(obuf, 1.);
   } else {
     aubio_wavetable_do (wavetable, obuf, obuf);
   }
@@ -63,13 +62,6 @@ int main(int argc, char **argv) {
   int ret = 0;
   examples_common_init(argc,argv);
 
-  verbmsg ("using source: %s at %dHz\n", source_uri, samplerate);
-  verbmsg ("onset method: %s, ", onset_method);
-  verbmsg ("buffer_size: %d, ", buffer_size);
-  verbmsg ("hop_size: %d, ", hop_size);
-  verbmsg ("silence: %f, ", silence_threshold);
-  verbmsg ("threshold: %f\n", onset_threshold);
-
   o = new_aubio_onset (onset_method, buffer_size, hop_size, samplerate);
   if (o == NULL) { ret = 1; goto beach; }
   if (onset_threshold != 0.)
@@ -79,13 +71,22 @@ int main(int argc, char **argv) {
   if (onset_minioi != 0.)
     aubio_onset_set_minioi_s (o, onset_minioi);
 
+  verbmsg ("using source: %s at %dHz\n", source_uri, samplerate);
+  verbmsg ("onset method: %s, ", onset_method);
+  verbmsg ("buffer_size: %d, ", buffer_size);
+  verbmsg ("hop_size: %d, ", hop_size);
+  verbmsg ("silence: %f, ", aubio_onset_get_silence(o));
+  verbmsg ("threshold: %f, ", aubio_onset_get_threshold(o));
+  verbmsg ("awhitening: %f, ", aubio_onset_get_awhitening(o));
+  verbmsg ("compression: %f\n", aubio_onset_get_compression(o));
+
   onset = new_fvec (1);
 
   wavetable = new_aubio_wavetable (samplerate, hop_size);
   aubio_wavetable_set_freq ( wavetable, 2450.);
   //aubio_sampler_load (sampler, "/archives/sounds/woodblock.aiff");
 
-  examples_common_process((aubio_process_func_t)process_block, process_print);
+  examples_common_process(process_block, process_print);
 
   // send a last note off
   if (usejack) {