diff --git a/pyproject.toml b/pyproject.toml index de469d4..5e21e95 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "nvda_voicemeeter" -version = "0.1.3" +version = "0.1.4" description = "A Voicemeeter app compatible with NVDA" authors = [ { name = "onyx-and-iris", email = "code@onyxandiris.online" }, diff --git a/src/nvda_voicemeeter/builder.py b/src/nvda_voicemeeter/builder.py index cf7549b..a9e0d41 100644 --- a/src/nvda_voicemeeter/builder.py +++ b/src/nvda_voicemeeter/builder.py @@ -102,8 +102,6 @@ class Builder: """tab0 row1 represents hardware outs""" def add_physical_device_opts(layout): - devices = get_output_device_list(self.vm) - devices.append("- remove device selection -") if self.kind.name == "basic": num_outs = self.kind.phys_out + self.kind.virt_out else: @@ -113,7 +111,7 @@ class Builder: psg.ButtonMenu( f"A{i + 1}", size=(6, 3), - menu_def=["", devices], + menu_def=["", get_output_device_list(i, self.vm)], key=f"HARDWARE OUT||A{i + 1}", ) for i in range(num_outs) diff --git a/src/nvda_voicemeeter/util.py b/src/nvda_voicemeeter/util.py index ee2e957..f38a2bd 100644 --- a/src/nvda_voicemeeter/util.py +++ b/src/nvda_voicemeeter/util.py @@ -17,8 +17,12 @@ def get_input_device_list(vm) -> list: return ["{type}: {name}".format(**vm.device.input(i)) for i in range(vm.device.ins)] -def get_output_device_list(vm) -> list: - return ["{type}: {name}".format(**vm.device.output(i)) for i in range(vm.device.outs)] +def get_output_device_list(i, vm) -> list: + devices = ["{type}: {name}".format(**vm.device.output(j)) for j in range(vm.device.outs)] + 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: