From 9d847cf01d47c8430c1e4c7cb793232162acec31 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Sat, 26 Aug 2023 09:07:02 +0100 Subject: [PATCH] strip outputs focus in event reads label if set --- src/nvda_voicemeeter/window.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/nvda_voicemeeter/window.py b/src/nvda_voicemeeter/window.py index 8367660..8d77e22 100644 --- a/src/nvda_voicemeeter/window.py +++ b/src/nvda_voicemeeter/window.py @@ -167,13 +167,14 @@ class NVDAVMWindow(psg.Window): self.nvda.speak(f"Patch INSERT IN#{num} {channel} {'on' if val else 'off'}") # Strip outputs - case [["STRIP", "0"], [output]]: + case [["STRIP", index], [output]]: val = not self.cache["outputs"][f"STRIP {index}||{output}"] setattr(self.vm.strip[int(index)], output, val) self.cache["outputs"][f"STRIP {index}||{output}"] = val case [["STRIP", index], [output], ["FOCUS", "IN"]]: val = self.cache["outputs"][f"STRIP {index}||{output}"] - self.nvda.speak(f"STRIP {index} {output} {'on' if val else 'off'}") + label = self.vm.strip[int(index)].label + self.nvda.speak(f"STRIP {index} {output} {label if label else ''} {'on' if val else 'off'}") case _: self.logger.error(f"Unknown event {event}") self.logger.debug(parsed_cmd)