blc_program_add_option(&display,'d',"display",NULL,"Display the result as text graph",NULL);
blc_program_add_option(&display,'d',"display",nullptr,"Display the result as text graph",nullptr);
blc_program_add_option(&output_name,'o',"output","blc_channel|-","channel containing the fast fourier transformation, or '-' for terminal output",DEFAULT_OUTPUT_NAME);
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_add_option(&spectrum_option,'s',"spectrum",nullptr,"Get the square value of the fftw signal",nullptr);
blc_program_add_parameter(&input_name,"input blc_channel",1,"Channel containing the sound data",nullptr);
blc_program_init(&argc,&argv,blc_quit);
SSCANF(1,period_str,"%d",&period);
...
...
@@ -45,26 +40,34 @@ int main(int argc, char**argv){
input.open(input_name,BLC_CHANNEL_READ);
if(input.type!='FL32')EXIT_ON_CHANNEL_ERROR(&input,"Input must be of type 'FL32'");
init_output_channel(&output,output_name,output_length);//C'est un blc_channel
else//C'est un format de fichier
{
if(strcmp(blc_get_filename_extension(output_name),"tsv")!=0)EXIT_ON_ERROR("Filename extension must be .tsv but your file is: '%s'.\nThis is to be sure you are not overwriting important file by mistake",output_name);
// if (strcmp(blc_get_filename_extension(output_name), "tsv")!=0) EXIT_ON_ERROR("Filename extension must be .tsv but your file is: '%s'.\nThis is to be sure you are not overwriting important file by mistake", output_name);
// This represents an error condition - the specified coefficient is greater than or equal to the number of filters. The behavior in this case is undefined.