shithub: aubio

Download patch

ref: 660cad22571134fe61b8feec1ef98b8adedfedd2
parent: 55c6da40f573b6e9cbccee16bc498acb32a11252
author: Paul Brossier <piem@altern.org>
date: Thu Jul 6 12:38:00 EDT 2006

rename threshold2 to silence
rename threshold2 to silence


--- a/examples/aubionotes.c
+++ b/examples/aubionotes.c
@@ -51,7 +51,7 @@
       }
 
       /* curlevel is negatif or 1 if silence */
-      curlevel = aubio_level_detection(ibuf, threshold2);
+      curlevel = aubio_level_detection(ibuf, silence);
       if (isonset) {
               /* test for silence */
               if (curlevel == 1.) {
--- a/examples/aubioonset.c
+++ b/examples/aubioonset.c
@@ -46,7 +46,7 @@
       isonset = aubio_peakpick_pimrt(onset,parms);
       if (isonset) {
         /* test for silence */
-        if (aubio_silence_detection(ibuf, threshold2)==1)
+        if (aubio_silence_detection(ibuf, silence)==1)
           isonset=0;
         else
           for (pos = 0; pos < overlap_size; pos++){
--- a/examples/aubioquiet.c
+++ b/examples/aubioquiet.c
@@ -38,7 +38,7 @@
     /*time for fft*/
     if (pos == overlap_size-1) {         
       /* test for silence */
-      if (aubio_silence_detection(ibuf, threshold2)==1) {
+      if (aubio_silence_detection(ibuf, silence)==1) {
 	if (wassilence==1) issilence = 1;
 	else issilence = 2;
         wassilence=1;
--- a/examples/aubiotrack.c
+++ b/examples/aubiotrack.c
@@ -84,7 +84,7 @@
                       //printf("tempo:\t%3.5f bpm \n", 
                       //60.*44100./overlap_size/abs(btoutput[2]-btoutput[1]));
                       /* test for silence */
-                      if (aubio_silence_detection(ibuf, threshold2)==1) {
+                      if (aubio_silence_detection(ibuf, silence)==1) {
                               isonset  = 0;
                               istactus = 0;
                       } else {
--- a/examples/utils.c
+++ b/examples/utils.c
@@ -38,7 +38,7 @@
 aubio_onsetdetection_type type_onset  = aubio_onset_kl;
 aubio_onsetdetection_type type_onset2 = aubio_onset_complex;
 smpl_t threshold                      = 0.3;
-smpl_t threshold2                     = -90.;
+smpl_t silence                        = -90.;
 uint_t buffer_size                    = 512; //1024;
 uint_t overlap_size                   = 256; //512;
 uint_t channels                       = 1;
@@ -177,7 +177,7 @@
                                 usedoubled = 0;
                                 break;
                         case 's':   /* threshold value for onset */
-                                threshold2 = (smpl_t)atof(optarg);
+                                silence = (smpl_t)atof(optarg);
                                 break;
                         case 't':   /* threshold value for onset */
                                 threshold = (smpl_t)atof(optarg);
--- a/examples/utils.h
+++ b/examples/utils.h
@@ -75,7 +75,7 @@
 extern aubio_onsetdetection_type type_onset;
 extern aubio_onsetdetection_type type_onset2;
 extern smpl_t threshold;
-extern smpl_t threshold2;
+extern smpl_t silence;
 extern uint_t buffer_size;
 extern uint_t overlap_size;
 extern uint_t channels;