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