From eb531a2fe71be817eaf848467b9c3680d100a469 Mon Sep 17 00:00:00 2001 From: Intel A80486DX2-66 Date: Tue, 9 Jan 2024 17:16:15 +0300 Subject: [PATCH] template.c: bit depth < 8: fix the bug --- src/template.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/template.c b/src/template.c index acf5632..38aeeed 100644 --- a/src/template.c +++ b/src/template.c @@ -139,7 +139,7 @@ main(void) // 4. if bit depth is less than 8, stretch it #if BIT_DEPTH < 8 sample_res = (SAMPLE_TYPE) - ((long double) buffer[w] * ((long double) BIT_DEPTH / 8.L)); + ((long double) sample_res * ((long double) BIT_DEPTH / 8.L)); #endif // 5. save sample into buffer