jack_control: add status2 command

While status command returns always, status2 command
allows followup chained commands.
This commit is contained in:
Nedko Arnaudov 2023-07-09 17:23:29 +03:00
parent a6f0b65a3f
commit 757bfbb903
1 changed files with 7 additions and 1 deletions

View File

@ -91,6 +91,7 @@ def print_help():
" help - print this help text\n"
" status - check whether jack server is started, "
"return value is 0 if running and 1 otherwise\n"
" status2 - check whether jack server is started, continue"
" start - start jack server if not currently started\n"
" stop - stop jack server if currently started\n"
" sm - switch master to currently selected driver\n"
@ -117,7 +118,6 @@ def print_help():
)
print(help_output)
def maybe_print_param_constraint(iface, param):
is_range, is_strict, is_fake, values = iface.GetParameterConstraint(param)
if is_range:
@ -156,6 +156,12 @@ def parse_argv(argv):
return (0, "started")
else:
return (1, "stopped")
elif arg == "status2":
print("--- status")
if control_iface.IsStarted():
print("started")
else:
print("stopped")
elif arg == 'start':
print("--- start")
control_iface.StartServer()