From 613f1acaa1f4c485cc4b2041820b439f7310279f Mon Sep 17 00:00:00 2001 From: Patrick Moessler Date: Sun, 5 Mar 2023 01:50:14 +0100 Subject: [PATCH] make audio semi-optional --- beamshow.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/beamshow.py b/beamshow.py index 662f755..4ddb2f7 100644 --- a/beamshow.py +++ b/beamshow.py @@ -307,7 +307,7 @@ def app_main() -> None: "--audio", metavar="NAME", type=str, - required=True, + default="", help="The audio device to use. Can be any substring", ) argparser.add_argument( @@ -357,9 +357,13 @@ def app_main() -> None: if args.list_displays: print_displays() - if args.list_displays: + if args.list_inputs: print_inputs() + if not args.audio: + print("Must select audio input") + sys.exit(-1) + show = Beamshow( audio_device_name=args.audio, render3d=args.render3d,