1
0

bytebeat_compiler.py: simplify the condition

This commit is contained in:
Intel A80486DX2-66 2024-09-23 02:38:14 +03:00
parent 259107b2b6
commit 2f900ccbc8
Signed by: 80486DX2-66
GPG Key ID: 83631EF27054609B

View File

@ -339,7 +339,9 @@ if __name__ == "__main__":
value if (value := args.final_sample_rate) else args.sample_rate value if (value := args.final_sample_rate) else args.sample_rate
# - Parse the '--skip-first' argument # - Parse the '--skip-first' argument
if not args.skip_first is None: if args.skip_first is None:
skip_first_samples = 0
else:
encountered_point = False encountered_point = False
encountered_s = False encountered_s = False
for character in args.skip_first: for character in args.skip_first:
@ -362,8 +364,6 @@ if __name__ == "__main__":
skip_first += [0] skip_first += [0]
skip_first_samples = skip_first[0] * actual_sample_rate + skip_first[1] skip_first_samples = skip_first[0] * actual_sample_rate + skip_first[1]
else:
skip_first_samples = 0
# round the number of skipped first samples # round the number of skipped first samples
skip_first_samples = ceil(skip_first_samples) skip_first_samples = ceil(skip_first_samples)