template.c: precalculate before loop where applicable
This commit is contained in:
parent
3bab4c8373
commit
24317101c0
@ -241,6 +241,17 @@ main(void)
|
||||
#endif
|
||||
|
||||
#if SEQUENTIAL_MODE
|
||||
const uintmax_t gen_length_minus_1 = GEN_LENGTH - 1,
|
||||
bit_depth_limiter = BIT_DEPTH_LIMITER
|
||||
#if FP_RETURN_TYPE
|
||||
+ 1
|
||||
#endif
|
||||
#if BIT_DEPTH < 8
|
||||
,
|
||||
bit_depth_stretch = ((long double) BIT_DEPTH) / 8.L
|
||||
#endif
|
||||
;
|
||||
|
||||
size_t time = 0;
|
||||
for (size_t seq = 0; seq < MAX; seq++) {
|
||||
if ((time + BLOCK_SIZE) >= GEN_LENGTH)
|
||||
@ -248,17 +259,6 @@ main(void)
|
||||
#endif
|
||||
|
||||
// * bytebeat generating loop
|
||||
const uintmax_t gen_length_minus_1 = GEN_LENGTH - 1,
|
||||
bit_depth_limiter = BIT_DEPTH_LIMITER
|
||||
#if FP_RETURN_TYPE
|
||||
+ 1
|
||||
#endif
|
||||
#if BIT_DEPTH < 8
|
||||
,
|
||||
bit_depth_stretch = ((long double) BIT_DEPTH) / 8.L
|
||||
#endif
|
||||
;
|
||||
|
||||
#if SEQUENTIAL_MODE
|
||||
for (size_t idx = 0; idx < BLOCK_SIZE && time < GEN_LENGTH; idx++,
|
||||
time++) {
|
||||
|
Loading…
Reference in New Issue
Block a user