bytebeat_compiler.py: simplify the condition
This commit is contained in:
parent
259107b2b6
commit
2f900ccbc8
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user