From 2fdc9bf0e9cb44957a5eaf9f128c775329315f68 Mon Sep 17 00:00:00 2001 From: Matthew Stratford Date: Thu, 2 Sep 2021 00:35:03 +0100 Subject: [PATCH] Reinitialise audio output on every load, to fix silent channels. --- player.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/player.py b/player.py index 3f76b9d..db0dec8 100644 --- a/player.py +++ b/player.py @@ -394,9 +394,13 @@ class Player: def load(self, weight: int): if not self.isPlaying: + loaded_state = self.state.get() self.unload() - showplan = self.state.get()["show_plan"] + self.logger.log.info("Resetting output (in case of sound output gone silent somehow) to " + str(loaded_state["output"])) + self.output(loaded_state["output"]) + + showplan = loaded_state["show_plan"] loaded_item: Optional[PlanItem] = None