adds missing karaoke mode k v

patch bump
This commit is contained in:
onyx-and-iris 2023-09-29 18:30:53 +01:00
parent 421688eff8
commit 1c09556c61
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
[project] [project]
name = "nvda_voicemeeter" name = "nvda_voicemeeter"
version = "0.5.3" version = "0.5.4"
description = "A Voicemeeter app compatible with NVDA" description = "A Voicemeeter app compatible with NVDA"
authors = [ authors = [
{ name = "onyx-and-iris", email = "code@onyxandiris.online" }, { name = "onyx-and-iris", email = "code@onyxandiris.online" },

View File

@ -668,14 +668,14 @@ class NVDAVMWindow(psg.Window):
actual = "k" actual = "k"
else: else:
actual = "mc" actual = "mc"
phonetic = {"k": "karaoke"}
if actual == "k": if actual == "k":
opts = ["off", "k m", "k 1", "k 2", "k v"]
next_val = self.vm.strip[int(index)].k + 1 next_val = self.vm.strip[int(index)].k + 1
if next_val == 4: if next_val == len(opts):
next_val = 0 next_val = 0
setattr(self.vm.strip[int(index)], actual, next_val) setattr(self.vm.strip[int(index)], actual, next_val)
self.cache["strip"][f"STRIP {index}||{param}"] = next_val self.cache["strip"][f"STRIP {index}||{param}"] = next_val
self.nvda.speak(["off", "k m", "k 1", "k 2"][next_val]) self.nvda.speak(opts[next_val])
else: else:
val = not self.cache["strip"][f"STRIP {index}||{param}"] val = not self.cache["strip"][f"STRIP {index}||{param}"]
setattr(self.vm.strip[int(index)], actual, val) setattr(self.vm.strip[int(index)], actual, val)