mirror of
https://github.com/onyx-and-iris/nvda-addon-voicemeeter.git
synced 2024-11-15 15:00:47 +00:00
adds version number to
announce_voicemeeter_version
This commit is contained in:
parent
149ed73605
commit
51ccd76c2a
@ -14,11 +14,11 @@ def _make_gestures():
|
||||
defaults = {
|
||||
"kb:NVDA+alt+s": "strip_mode",
|
||||
"kb:NVDA+alt+b": "bus_mode",
|
||||
"kb:NVDA+alt+g": "slider_mode",
|
||||
"kb:NVDA+alt+c": "slider_mode",
|
||||
"kb:NVDA+alt+t": "slider_mode",
|
||||
"kb:NVDA+alt+d": "slider_mode",
|
||||
"kb:NVDA+alt+a": "slider_mode",
|
||||
"kb:NVDA+alt+g": "slider_mode", # Gate
|
||||
"kb:NVDA+alt+c": "slider_mode", # Comp
|
||||
"kb:NVDA+alt+t": "slider_mode", # Gate
|
||||
"kb:NVDA+alt+d": "slider_mode", # Denoiser
|
||||
"kb:NVDA+alt+a": "slider_mode", # Audibility
|
||||
"kb:NVDA+shift+q": "announce_controller",
|
||||
"kb:NVDA+shift+a": "announce_voicemeeter_version",
|
||||
"kb:NVDA+shift+o": "toggle_mono",
|
||||
|
@ -22,6 +22,10 @@ class Binds:
|
||||
bind_get_voicemeeter_type.restype = LONG
|
||||
bind_get_voicemeeter_type.argtypes = [ct.POINTER(LONG)]
|
||||
|
||||
bind_get_voicemeeter_version = libc.VBVMR_GetVoicemeeterVersion
|
||||
bind_get_voicemeeter_version.restype = LONG
|
||||
bind_get_voicemeeter_version.argtypes = [ct.POINTER(LONG)]
|
||||
|
||||
bind_is_parameters_dirty = libc.VBVMR_IsParametersDirty
|
||||
bind_is_parameters_dirty.restype = LONG
|
||||
bind_is_parameters_dirty.argtypes = None
|
||||
|
@ -8,7 +8,7 @@ class CommandsMixin:
|
||||
### ANNOUNCEMENTS ###
|
||||
|
||||
def script_announce_voicemeeter_version(self, _):
|
||||
ui.message(f"Running Voicemeeter {self.kind}")
|
||||
ui.message(f"Running Voicemeeter {self.kind} {self.controller.version}")
|
||||
|
||||
def script_announce_controller(self, _):
|
||||
ui.message(f"Controller for {self.controller.ctx.strategy} {self.controller.ctx.index + 1}")
|
||||
|
@ -27,6 +27,17 @@ class Controller(Binds):
|
||||
self.call(self.bind_get_voicemeeter_type, ct.byref(c_type))
|
||||
return KindId(c_type.value).name.lower()
|
||||
|
||||
@property
|
||||
def version(self):
|
||||
ver = ct.c_long()
|
||||
self.call(self.bind_get_voicemeeter_version, ct.byref(ver))
|
||||
return "{}.{}.{}.{}".format(
|
||||
(ver.value & 0xFF000000) >> 24,
|
||||
(ver.value & 0x00FF0000) >> 16,
|
||||
(ver.value & 0x0000FF00) >> 8,
|
||||
ver.value & 0x000000FF,
|
||||
)
|
||||
|
||||
def run_voicemeeter(self, kind_id):
|
||||
val = kind_id.value
|
||||
if val == 3 and BITS == 64:
|
||||
|
Loading…
Reference in New Issue
Block a user