Commit 54029cb4 authored by Arnaud Blanchard's avatar Arnaud Blanchard
Browse files

Add blc_quit in parameter of blc_init of each program

parent ee53a5d4
......@@ -38,7 +38,7 @@ int main(int argc, char**argv){
blc_program_add_option(&period_str, 'p', "period", "integer", "Period in ms (0 as fast as possible).", "0");
blc_program_add_option(&spectrum_option, 's', "spectrum", NULL, "Get the square value of the fftw signal", NULL);
blc_program_add_parameter(&input_name, "input blc_channel", 1, "Channel containing the sound data", NULL);
blc_program_init(&argc, &argv, NULL);
blc_program_init(&argc, &argv, blc_quit);
SSCANF(1, period_str, "%d", &period);
//Open input channel and check the type of values
......@@ -77,8 +77,10 @@ int main(int argc, char**argv){
output.floats[i]=sqrtf(intermediate[i][0]*intermediate[i][0]+intermediate[i][1]*intermediate[i][1])/input.total_length;
}
//if output is not a channel we export to standard output
if (file) output.fprint_tsv(file);
if (file) {
// if (blc_loop_iteration && file==stdout && blc_output_terminal) blc_eprint_cursor_up(100);
output.fprint_tsv(file);
}
if(display){
blc_fprint_float_graph(stderr, output.floats, output.total_length, "spectrum", columns_nb, rows_nb, 1, 0, "Frequency", "Intensity");
blc_eprint_cursor_up(rows_nb);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment