diff --git a/bytebeat_compiler.py b/bytebeat_compiler.py index 4e14217..15271e1 100644 --- a/bytebeat_compiler.py +++ b/bytebeat_compiler.py @@ -162,6 +162,8 @@ if __name__ == "__main__": final_sample_rate_code = f"w /= {sample_rate_ratio}L;" args.sample_rate = args.final_sample_rate + final_sample_rate = \ + value if (value := args.final_sample_rate) else original_sample_rate samples = 0 while True: no_seconds = args.seconds is None or args.seconds == 0 @@ -176,9 +178,9 @@ if __name__ == "__main__": if no_seconds and samples_exist: samples = args.samples elif seconds_exist and samples_exist: - samples = args.seconds * args.final_sample_rate + args.samples + samples = args.seconds * final_sample_rate + args.samples elif seconds_exist and no_samples: - samples = args.seconds * args.final_sample_rate + samples = args.seconds * final_sample_rate elif no_seconds and no_samples: args.seconds = 30 # default continue