Add debug configuration setting

This commit is contained in:
Correl Roush 2020-09-01 23:16:09 -04:00
parent 77b28a54ad
commit bf70b06e72
2 changed files with 3 additions and 1 deletions

View file

@ -1,4 +1,5 @@
{
"debug": false,
"audio": {
"device": "hw:1,0",
"framerate": 48000,

View file

@ -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()