mirror of
https://github.com/onyx-and-iris/nvda-voicemeeter.git
synced 2024-11-22 18:00:50 +00:00
Merge remote-tracking branch 'origin/dev' into add-advanced-settings
This commit is contained in:
commit
245476adfd
@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "nvda_voicemeeter"
|
name = "nvda_voicemeeter"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
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" },
|
||||||
|
@ -102,8 +102,6 @@ class Builder:
|
|||||||
"""tab0 row1 represents hardware outs"""
|
"""tab0 row1 represents hardware outs"""
|
||||||
|
|
||||||
def add_physical_device_opts(layout):
|
def add_physical_device_opts(layout):
|
||||||
devices = get_output_device_list(self.vm)
|
|
||||||
devices.append("- remove device selection -")
|
|
||||||
if self.kind.name == "basic":
|
if self.kind.name == "basic":
|
||||||
num_outs = self.kind.phys_out + self.kind.virt_out
|
num_outs = self.kind.phys_out + self.kind.virt_out
|
||||||
else:
|
else:
|
||||||
@ -113,7 +111,7 @@ class Builder:
|
|||||||
psg.ButtonMenu(
|
psg.ButtonMenu(
|
||||||
f"A{i + 1}",
|
f"A{i + 1}",
|
||||||
size=(6, 3),
|
size=(6, 3),
|
||||||
menu_def=["", devices],
|
menu_def=["", get_output_device_list(i, self.vm)],
|
||||||
key=f"HARDWARE OUT||A{i + 1}",
|
key=f"HARDWARE OUT||A{i + 1}",
|
||||||
)
|
)
|
||||||
for i in range(num_outs)
|
for i in range(num_outs)
|
||||||
|
@ -13,12 +13,32 @@ def get_insert_checkbox_index(kind, channel, num) -> int:
|
|||||||
return (2 * kind.phys_in) + (8 * (num - kind.phys_in - 1)) + channel
|
return (2 * kind.phys_in) + (8 * (num - kind.phys_in - 1)) + channel
|
||||||
|
|
||||||
|
|
||||||
|
_rejected_ids = (
|
||||||
|
"VBAudio100VMVAIO3",
|
||||||
|
"{F5735BD4-6EAF-4758-9710-9886E5AD0FF3}",
|
||||||
|
"{0239BE07-CEEF-4236-A900-AA778D432FD4}",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def get_input_device_list(vm) -> list:
|
def get_input_device_list(vm) -> list:
|
||||||
return ["{type}: {name}".format(**vm.device.input(i)) for i in range(vm.device.ins)]
|
devices = []
|
||||||
|
for j in range(vm.device.ins):
|
||||||
|
device = vm.device.input(j)
|
||||||
|
if device["id"] not in _rejected_ids:
|
||||||
|
devices.append("{type}: {name}".format(**device))
|
||||||
|
return devices
|
||||||
|
|
||||||
|
|
||||||
def get_output_device_list(vm) -> list:
|
def get_output_device_list(i, vm) -> list:
|
||||||
return ["{type}: {name}".format(**vm.device.output(i)) for i in range(vm.device.outs)]
|
devices = []
|
||||||
|
for j in range(vm.device.outs):
|
||||||
|
device = vm.device.output(j)
|
||||||
|
if device["id"] not in _rejected_ids:
|
||||||
|
devices.append("{type}: {name}".format(**device))
|
||||||
|
if i == 0:
|
||||||
|
return devices
|
||||||
|
devices.append("- remove device selection -")
|
||||||
|
return [device for device in devices if not device.startswith("asio")]
|
||||||
|
|
||||||
|
|
||||||
def get_patch_composite_list(kind) -> list:
|
def get_patch_composite_list(kind) -> list:
|
||||||
|
@ -459,7 +459,7 @@ class NVDAVMWindow(psg.Window):
|
|||||||
setattr(self.vm.strip[index].device, "wdm", "")
|
setattr(self.vm.strip[index].device, "wdm", "")
|
||||||
self.TKroot.after(200, self.nvda.speak, f"HARDWARE IN {key} device selection removed")
|
self.TKroot.after(200, self.nvda.speak, f"HARDWARE IN {key} device selection removed")
|
||||||
case [driver, device_name]:
|
case [driver, device_name]:
|
||||||
setattr(self.vm.strip[index].device, driver, device_name.strip())
|
setattr(self.vm.strip[index].device, driver, device_name.lstrip())
|
||||||
phonetic = {"mme": "em em e"}
|
phonetic = {"mme": "em em e"}
|
||||||
self.TKroot.after(
|
self.TKroot.after(
|
||||||
200,
|
200,
|
||||||
@ -480,7 +480,7 @@ class NVDAVMWindow(psg.Window):
|
|||||||
setattr(self.vm.bus[index].device, "wdm", "")
|
setattr(self.vm.bus[index].device, "wdm", "")
|
||||||
self.TKroot.after(200, self.nvda.speak, f"HARDWARE OUT {key} device selection removed")
|
self.TKroot.after(200, self.nvda.speak, f"HARDWARE OUT {key} device selection removed")
|
||||||
case [driver, device_name]:
|
case [driver, device_name]:
|
||||||
setattr(self.vm.bus[index].device, driver, device_name.strip())
|
setattr(self.vm.bus[index].device, driver, device_name.lstrip())
|
||||||
phonetic = {"mme": "em em e"}
|
phonetic = {"mme": "em em e"}
|
||||||
self.TKroot.after(
|
self.TKroot.after(
|
||||||
200,
|
200,
|
||||||
|
Loading…
Reference in New Issue
Block a user