template.c: fix CLI
This commit is contained in:
parent
bf67c9cce2
commit
7934deac9e
@ -132,12 +132,6 @@ main(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// * write WAVE headers
|
// * write WAVE headers
|
||||||
// 0. log
|
|
||||||
#if !SILENT_MODE
|
|
||||||
printf("\nWriting out file " OUTPUT_FILE "...\n");
|
|
||||||
fflush(stdout);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// 1. open file
|
// 1. open file
|
||||||
FILE* output_file = fopen(OUTPUT_FILE, "wb");
|
FILE* output_file = fopen(OUTPUT_FILE, "wb");
|
||||||
if (output_file == NULL || !output_file) {
|
if (output_file == NULL || !output_file) {
|
||||||
@ -242,12 +236,16 @@ main(void)
|
|||||||
|
|
||||||
#if !SILENT_MODE
|
#if !SILENT_MODE
|
||||||
printf("%s", ANSI_CLEAR);
|
printf("%s", ANSI_CLEAR);
|
||||||
|
|
||||||
|
// 5. log
|
||||||
|
printf("\nWriting out file " OUTPUT_FILE "...\n");
|
||||||
|
fflush(stdout);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// * save the sample data into the file
|
// * save the sample data into the file
|
||||||
fwrite_le(buffer, sizeof(SAMPLE_TYPE), buffer_size, output_file);
|
fwrite_le(buffer, sizeof(SAMPLE_TYPE), buffer_size, output_file);
|
||||||
|
|
||||||
// 5. close file
|
// 6. close file
|
||||||
fclose(output_file);
|
fclose(output_file);
|
||||||
|
|
||||||
// * end of program
|
// * end of program
|
||||||
|
Loading…
Reference in New Issue
Block a user