diff options
Diffstat (limited to 'src/lingot-config.c')
| -rw-r--r-- | src/lingot-config.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/lingot-config.c b/src/lingot-config.c index e228540..898c56f 100644 --- a/src/lingot-config.c +++ b/src/lingot-config.c @@ -35,12 +35,12 @@ char* token[] = { "AUDIO_DEV", "SAMPLE_RATE", "OVERSAMPLING", "ROOT_FREQUENCY_ERROR", "MIN_FREQUENCY", "FFT_SIZE", "TEMPORAL_WINDOW", "NOISE_THRESHOLD", "CALCULATION_RATE", "VISUALIZATION_RATE", "PEAK_NUMBER", "PEAK_ORDER", - "PEAK_REJECTION_RELATION", "DFT_NUMBER", "DFT_SIZE", "YIN_THRESHOLD", - "ESTIMATOR", NULL // NULL terminated array + "PEAK_REJECTION_RELATION", "DFT_NUMBER", "DFT_SIZE", "YIN_THRESHOLD_LOW", + "YIN_THRESHOLD_HIGH", "ESTIMATOR", NULL // NULL terminated array }; // print/scan param formats. -const char* format = "sddffdffffddfddfd"; +const char* format = "sddffdffffddfddffd"; //---------------------------------------------------------------------------- @@ -59,10 +59,10 @@ LingotConfig* lingot_config_new() &config->noise_threshold_db, &config->calculation_rate, &config->visualization_rate, &config->peak_number, &config->peak_order, &config->peak_rejection_relation_db, - &config->dft_number, &config->dft_size, &config->yin_threshold, - &config->estimator }; + &config->dft_number, &config->dft_size, &config->yin_threshold_low, + &config->yin_threshold_high, &config->estimator }; - memcpy(config->param, c_param, 17*sizeof(void*)); + memcpy(config->param, c_param, 18*sizeof(void*)); return config; } @@ -100,7 +100,8 @@ void lingot_config_reset(LingotConfig* config) config->vr = -0.45; // near to minimum - config->yin_threshold = 0.1; + config->yin_threshold_low = 0.1; + config->yin_threshold_high = 0.2; config->estimator = 0; lingot_config_update_internal_params(config); |
