make audio semi-optional

This commit is contained in:
Patrick Moessler 2023-03-05 01:50:14 +01:00
parent 345c06611b
commit 613f1acaa1

View file

@ -307,7 +307,7 @@ def app_main() -> None:
"--audio", "--audio",
metavar="NAME", metavar="NAME",
type=str, type=str,
required=True, default="",
help="The audio device to use. Can be any substring", help="The audio device to use. Can be any substring",
) )
argparser.add_argument( argparser.add_argument(
@ -357,9 +357,13 @@ def app_main() -> None:
if args.list_displays: if args.list_displays:
print_displays() print_displays()
if args.list_displays: if args.list_inputs:
print_inputs() print_inputs()
if not args.audio:
print("Must select audio input")
sys.exit(-1)
show = Beamshow( show = Beamshow(
audio_device_name=args.audio, audio_device_name=args.audio,
render3d=args.render3d, render3d=args.render3d,