From 9a344bd50c5f975fb022a5a9172b909fdd06d9c6 Mon Sep 17 00:00:00 2001 From: Intel A80486DX2-66 Date: Sat, 30 Dec 2023 14:15:34 +0300 Subject: [PATCH] template.c: correct endianness of `buffer_size` --- src/template.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/template.c b/src/template.c index ddabb34..41d9f60 100644 --- a/src/template.c +++ b/src/template.c @@ -209,7 +209,7 @@ main(void) fwrite(&block_align, 2, 1, output_file); // L : BlockAlign : 2 fwrite(&bit_depth, 2, 1, output_file); // L : BitsPerSample : 2 fwrite("data", 1, 4, output_file); // B : Subchunk2ID : 4 - fwrite(&buffer_size, 4, 1, output_file); // B : Subchunk2Size : 4 + fwrite(&buffer_size, 4, 1, output_file); // L : Subchunk2Size : 4 // 4. write sample data fwrite(buffer, sizeof(SAMPLE_TYPE), buffer_size, output_file);