b/c...py: use term specified
for length
This commit is contained in:
parent
01efd27e07
commit
c6d9d833d0
@ -168,18 +168,18 @@ if __name__ == "__main__":
|
||||
while True:
|
||||
no_seconds = args.seconds is None or args.seconds == 0
|
||||
no_samples = args.samples is None or args.samples == 0
|
||||
seconds_exist = not no_seconds
|
||||
samples_exist = not no_samples
|
||||
seconds_specified = not no_seconds
|
||||
samples_specified = not no_samples
|
||||
|
||||
if seconds_exist and args.seconds < 0:
|
||||
if seconds_specified and args.seconds < 0:
|
||||
print("CLI: Count of seconds can't be less than zero.")
|
||||
raise SystemExit
|
||||
|
||||
if no_seconds and samples_exist:
|
||||
if no_seconds and samples_specified:
|
||||
samples = args.samples
|
||||
elif seconds_exist and samples_exist:
|
||||
elif seconds_specified and samples_specified:
|
||||
samples = args.seconds * final_sample_rate + args.samples
|
||||
elif seconds_exist and no_samples:
|
||||
elif seconds_specified and no_samples:
|
||||
samples = args.seconds * final_sample_rate
|
||||
elif no_seconds and no_samples:
|
||||
args.seconds = 30 # default
|
||||
|
Loading…
Reference in New Issue
Block a user