bytebeat_compiler.py: fix sample rate logic
This commit is contained in:
parent
d1906f0dc1
commit
d326f32193
@ -176,9 +176,9 @@ if __name__ == "__main__":
|
||||
if no_seconds and samples_exist:
|
||||
samples = args.samples
|
||||
elif seconds_exist and samples_exist:
|
||||
samples = args.seconds * args.sample_rate + args.samples
|
||||
samples = args.seconds * args.final_sample_rate + args.samples
|
||||
elif seconds_exist and no_samples:
|
||||
samples = args.seconds * args.sample_rate
|
||||
samples = args.seconds * args.final_sample_rate
|
||||
elif no_seconds and no_samples:
|
||||
args.seconds = 30 # default
|
||||
continue
|
||||
@ -197,7 +197,8 @@ if __name__ == "__main__":
|
||||
rewrite_file(PATHS["substitute"], substitute_vars({
|
||||
"bytebeat_contents": bytebeat_contents,
|
||||
"output_file": C_str_repr(args.output),
|
||||
"sample_rate": args.sample_rate,
|
||||
"sample_rate": \
|
||||
value if (value := args.final_sample_rate) else args.sample_rate,
|
||||
"original_sample_rate": original_sample_rate,
|
||||
"final_sample_rate_code": final_sample_rate_code,
|
||||
"bit_depth": args.bit_depth,
|
||||
|
Loading…
Reference in New Issue
Block a user