1
0

bytebeat_compiler.py: optimize the condition

This commit is contained in:
Intel A80486DX2-66 2024-01-09 23:19:38 +03:00
parent 8e68c840a1
commit bf67c9cce2
Signed by: 80486DX2-66
GPG Key ID: 83631EF27054609B

View File

@ -148,7 +148,7 @@ if __name__ == "__main__":
final_sample_rate_code = "" final_sample_rate_code = ""
if args.faster_sample_ratio_math: if args.faster_sample_ratio_math:
args.precalculate_ratio = True args.precalculate_ratio = True
if not args.final_sample_rate is None and args.precalculate_ratio: if args.precalculate_ratio and not args.final_sample_rate is None:
if args.faster_sample_ratio_math: if args.faster_sample_ratio_math:
sample_rate_ratio = args.sample_rate / args.final_sample_rate sample_rate_ratio = args.sample_rate / args.final_sample_rate
final_sample_rate_code = f"w *= {sample_rate_ratio}L;" final_sample_rate_code = f"w *= {sample_rate_ratio}L;"