shithub: aubio

Download patch

ref: ec45138affa73c6dbdc88a914b2388b66eee086d
parent: ab7212f9f0852254b7ea7c76ce95c14f84110947
author: Paul Brossier <[email protected]>
date: Sun Dec 11 11:49:47 EST 2016

examples/aubionotes.c: add warning for missing options

--- a/examples/aubionotes.c
+++ b/examples/aubionotes.c
@@ -69,7 +69,20 @@
   notes = new_aubio_notes ("default", buffer_size, hop_size, samplerate);
   if (notes == NULL) { ret = 1; goto beach; }
 
-  if (onset_minioi != 0.) errmsg ("warning: minioio not supported yet\n");
+  if (onset_minioi != 0.) {
+    errmsg ("warning: onset minioio not supported yet\n");
+    //aubio_onset_set_minioi_ms(aubio_notes_get_aubio_onset(o), onset_minioi);
+  }
+  if (onset_threshold != 0.) {
+    errmsg ("warning: onset threshold not supported yet\n");
+    //aubio_onset_set_threshold(aubio_notes_get_aubio_onset(o), onset_threshold);
+  }
+  if (silence_threshold != -90.) {
+    if (aubio_notes_set_silence (notes, silence_threshold) != 0) {
+      errmsg ("failed setting notes silence threshold to %.2f\n",
+          silence_threshold);
+    }
+  }
 
   examples_common_process((aubio_process_func_t)process_block, process_print);