diff --git a/turntable.sample.json b/turntable.sample.json index 6a5b7d7..9219909 100644 --- a/turntable.sample.json +++ b/turntable.sample.json @@ -1,4 +1,5 @@ { + "debug": false, "audio": { "device": "hw:1,0", "framerate": 48000, diff --git a/turntable/cli.py b/turntable/cli.py index 52bf19c..25bbd98 100644 --- a/turntable/cli.py +++ b/turntable/cli.py @@ -23,7 +23,6 @@ VERSION = importlib.metadata.version("turntable") def main() -> None: - logging.basicConfig(level=logging.INFO) print(f"Turntable {VERSION}") parser = argparse.ArgumentParser() @@ -34,6 +33,8 @@ def main() -> None: with open(args.config, "r") as config_file: config: Dict[str, Any] = json.load(config_file) + logging.basicConfig(level=logging.DEBUG if config.get("debug") else logging.INFO) + pcm_in: "Queue[PCM]" = Queue() events: "Queue[Event]" = Queue()