From 660cad22571134fe61b8feec1ef98b8adedfedd2 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Thu, 6 Jul 2006 16:38:00 +0000 Subject: [PATCH] rename threshold2 to silence rename threshold2 to silence --- examples/aubionotes.c | 2 +- examples/aubioonset.c | 2 +- examples/aubioquiet.c | 2 +- examples/aubiotrack.c | 2 +- examples/utils.c | 4 ++-- examples/utils.h | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/aubionotes.c b/examples/aubionotes.c index 11abb43e..c4e113ef 100644 --- a/examples/aubionotes.c +++ b/examples/aubionotes.c @@ -51,7 +51,7 @@ int aubio_process(float **input, float **output, int nframes) { } /* 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.) { diff --git a/examples/aubioonset.c b/examples/aubioonset.c index 67c0395e..880526f3 100644 --- a/examples/aubioonset.c +++ b/examples/aubioonset.c @@ -46,7 +46,7 @@ int aubio_process(float **input, float **output, int nframes) { 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++){ diff --git a/examples/aubioquiet.c b/examples/aubioquiet.c index a9c3f461..4daa173c 100644 --- a/examples/aubioquiet.c +++ b/examples/aubioquiet.c @@ -38,7 +38,7 @@ int aubio_process(float **input, float **output, int nframes) { /*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; diff --git a/examples/aubiotrack.c b/examples/aubiotrack.c index 6da2514e..3eda8f3d 100644 --- a/examples/aubiotrack.c +++ b/examples/aubiotrack.c @@ -84,7 +84,7 @@ int aubio_process(float **input, float **output, int nframes) { //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 { diff --git a/examples/utils.c b/examples/utils.c index 43f67f76..0de946ea 100644 --- a/examples/utils.c +++ b/examples/utils.c @@ -38,7 +38,7 @@ int usedoubled = 1; 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 @@ int parse_args (int argc, char **argv) { 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); diff --git a/examples/utils.h b/examples/utils.h index 3c48b652..d4d02235 100644 --- a/examples/utils.h +++ b/examples/utils.h @@ -75,7 +75,7 @@ extern int usedoubled; 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; -- 2.26.2