summaryrefslogtreecommitdiffhomepage
path: root/src/lingot-config.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lingot-config.c')
-rw-r--r--src/lingot-config.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/lingot-config.c b/src/lingot-config.c
index 7164a29..a46e372 100644
--- a/src/lingot-config.c
+++ b/src/lingot-config.c
@@ -34,11 +34,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", NULL // NULL terminated array
+ "PEAK_REJECTION_RELATION", "DFT_NUMBER", "DFT_SIZE", "YIN_THRESHOLD",
+ "ESTIMATOR", NULL // NULL terminated array
};
// print/scan param formats.
-const char* format = "sddffdffffddfdd";
+const char* format = "sddffdffffddfddfd";
//----------------------------------------------------------------------------
@@ -57,9 +58,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->dft_number, &config->dft_size, &config->yin_threshold,
+ &config->estimator };
- memcpy(config->param, c_param, 15*sizeof(void*));
+ memcpy(config->param, c_param, 17*sizeof(void*));
return config;
}
@@ -97,6 +99,9 @@ void lingot_config_reset(LingotConfig* config)
config->vr = -0.45; // near to minimum
+ config->yin_threshold = 0.1;
+ config->estimator = 0;
+
lingot_config_update_internal_params(config);
}