Skip to content

Commit

Permalink
fixes hardware out A2 for basic kind.
Browse files Browse the repository at this point in the history
patch bump
  • Loading branch information
onyx-and-iris committed Sep 6, 2023
1 parent 962b61f commit ed5f9ae
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 11 deletions.
8 changes: 4 additions & 4 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
[project]
name = "nvda_voicemeeter"
version = "0.1.0"
version = "0.1.1"
description = "A Voicemeeter app compatible with NVDA"
authors = [
{name = "onyx-and-iris", email = "[email protected]"},
{ name = "onyx-and-iris", email = "[email protected]" },
]
dependencies = [
"pysimplegui>=4.60.5",
"pyparsing>=3.1.1",
"voicemeeter-api>=2.4.8",
"voicemeeter-api>=2.4.9",
]
requires-python = ">=3.10,<3.11"
readme = "README.md"
license = {text = "MIT"}

[project.license]
text = "MIT"

[tool.pdm.dev-dependencies]
build = [
Expand All @@ -26,5 +28,5 @@ test = [
"psgdemos>=1.12.1",
]

[tool.pdm.scripts]
build = {shell = "build.ps1"}
[tool.pdm.scripts.build]
shell = "build.ps1"
5 changes: 4 additions & 1 deletion src/nvda_voicemeeter/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ def _make_hardware_ins_cache(vm) -> dict:


def _make_hardware_outs_cache(vm) -> dict:
return {**{f"HARDWARE OUT||A{i + 1}": vm.bus[i].device.name for i in range(vm.kind.phys_out)}}
hw_outs = {**{f"HARDWARE OUT||A{i + 1}": vm.bus[i].device.name for i in range(vm.kind.phys_out)}}
if vm.kind.name == "basic":
hw_outs |= {f"HARDWARE OUT||A2": vm.bus[1].device.name}
return hw_outs


def _make_param_cache(vm, channel_type) -> dict:
Expand Down
6 changes: 6 additions & 0 deletions src/nvda_voicemeeter/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ def __init__(self, title, vm):
self[f"HARDWARE IN||{i + 1}"].Widget.config(**buttonmenu_opts)
for i in range(self.kind.phys_out):
self[f"HARDWARE OUT||A{i + 1}"].Widget.config(**buttonmenu_opts)
if self.kind.name == "basic":
self[f"HARDWARE OUT||A2"].Widget.config(**buttonmenu_opts)
if self.kind.name != "basic":
[self[f"PATCH COMPOSITE||PC{i + 1}"].Widget.config(**buttonmenu_opts) for i in range(self.kind.phys_out)]
self["ASIO BUFFER"].Widget.config(**buttonmenu_opts)
Expand Down Expand Up @@ -138,6 +140,10 @@ def register_events(self):
self[f"HARDWARE OUT||A{i + 1}"].bind("<FocusIn>", "||FOCUS IN")
self[f"HARDWARE OUT||A{i + 1}"].bind("<space>", "||KEY SPACE", propagate=False)
self[f"HARDWARE OUT||A{i + 1}"].bind("<Return>", "||KEY ENTER", propagate=False)
if self.vm.kind.name == "basic":
self[f"HARDWARE OUT||A2"].bind("<FocusIn>", "||FOCUS IN")
self[f"HARDWARE OUT||A2"].bind("<space>", "||KEY SPACE", propagate=False)
self[f"HARDWARE OUT||A2"].bind("<Return>", "||KEY ENTER", propagate=False)

# Patch ASIO
if self.kind.name != "basic":
Expand Down

0 comments on commit ed5f9ae

Please sign in to comment.