From 7934deac9e69bac39be37e25b3d9f4f09380f8ed Mon Sep 17 00:00:00 2001 From: Intel A80486DX2-66 Date: Tue, 9 Jan 2024 23:23:31 +0300 Subject: [PATCH] template.c: fix CLI --- src/template.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/template.c b/src/template.c index 8da37c8..f914530 100644 --- a/src/template.c +++ b/src/template.c @@ -132,12 +132,6 @@ main(void) #endif // * write WAVE headers - // 0. log -#if !SILENT_MODE - printf("\nWriting out file " OUTPUT_FILE "...\n"); - fflush(stdout); -#endif - // 1. open file FILE* output_file = fopen(OUTPUT_FILE, "wb"); if (output_file == NULL || !output_file) { @@ -242,12 +236,16 @@ main(void) #if !SILENT_MODE printf("%s", ANSI_CLEAR); + + // 5. log + printf("\nWriting out file " OUTPUT_FILE "...\n"); + fflush(stdout); #endif // * save the sample data into the file fwrite_le(buffer, sizeof(SAMPLE_TYPE), buffer_size, output_file); - // 5. close file + // 6. close file fclose(output_file); // * end of program