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