mirror of
https://github.com/onyx-and-iris/nvda-addon-voicemeeter.git
synced 2025-04-01 19:33:46 +01:00
Compare commits
6 Commits
68462016a5
...
43379f1b09
Author | SHA1 | Date | |
---|---|---|---|
43379f1b09 | |||
dc9ac5ddc3 | |||
9764b9d827 | |||
d95a2280c6 | |||
5534381981 | |||
0522b69420 |
50
.github/workflows/build_addon.yml
vendored
50
.github/workflows/build_addon.yml
vendored
@ -15,50 +15,46 @@ jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ['3.11']
|
||||
os: [ubuntu-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up PDM
|
||||
uses: pdm-project/setup-pdm@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pdm sync -d -G build
|
||||
|
||||
- run: echo -e "pre-commit\nscons\nmarkdown">requirements.txt
|
||||
- name: building addon
|
||||
run: pdm run scons
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.9
|
||||
cache: 'pip'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip wheel
|
||||
pip install -r requirements.txt
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y gettext
|
||||
|
||||
- name: Code checks
|
||||
run: export SKIP=no-commit-to-branch; pre-commit run --all
|
||||
|
||||
- name: building addon
|
||||
run: scons
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: packaged_addon
|
||||
path: ./*.nvda-addon
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: packaged_addon
|
||||
path: ./*.nvda-addon
|
||||
|
||||
upload_release:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||
needs: ["build"]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: download releases files
|
||||
uses: actions/download-artifact@v4.1.7
|
||||
with:
|
||||
name: packaged_addon
|
||||
- name: Display structure of downloaded files
|
||||
run: ls -R
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: packaged_addon/*.nvda-addon
|
||||
files: ./*.nvda-addon
|
||||
fail_on_unmatched_files: true
|
||||
prerelease: ${{ contains(github.ref, '-') }}
|
||||
|
@ -85,6 +85,7 @@ example:
|
||||
```json
|
||||
{
|
||||
"voicemeeter": "banana",
|
||||
"bits": 64,
|
||||
"keybinds": {
|
||||
"NVDA+alt+k": "strip_mode",
|
||||
"NVDA+alt+l": "bus_mode",
|
||||
@ -120,6 +121,7 @@ example:
|
||||
Would make the following changes:
|
||||
|
||||
- load the plugin in `banana` mode (default is potato)
|
||||
- override the bits of Voicemeeter GUI to 64 (default is 32)
|
||||
- change the `strip_mode` and `bus_mode` binds to `NVDA+alt+k` and `NVDA+alt+l` respectively
|
||||
- change the `announce_voicemeeter_version` bind to `NVDA+shift+z`
|
||||
- changes the bus assignment binds to `NVDA+control+number`
|
||||
|
@ -43,7 +43,4 @@ dll_path = vm_parent.joinpath(DLL_NAME)
|
||||
if not dll_path.is_file():
|
||||
raise VMError(f'Could not find {dll_path}')
|
||||
|
||||
if BITS == 64:
|
||||
libc = ct.CDLL(str(dll_path))
|
||||
else:
|
||||
libc = ct.WinDLL(str(dll_path))
|
||||
libc = ct.WinDLL(str(dll_path))
|
||||
|
@ -8,7 +8,7 @@ class CommandsMixin:
|
||||
### ANNOUNCEMENTS ###
|
||||
|
||||
def script_announce_voicemeeter_version(self, _):
|
||||
ui.message(f'Running Voicemeeter {self.kind} {self.controller.version}')
|
||||
ui.message(f'Running Voicemeeter {self.kind} {self.controller.version} {self.controller.bits} bit')
|
||||
|
||||
def script_announce_controller(self, _):
|
||||
ui.message(f'Controller for {self.controller.ctx.strategy} {self.controller.ctx.index + 1}')
|
||||
|
@ -2,6 +2,7 @@ import ctypes as ct
|
||||
|
||||
from logHandler import log
|
||||
|
||||
from . import config
|
||||
from .binds import Binds
|
||||
from .cdll import BITS
|
||||
from .context import Context, StripStrategy
|
||||
@ -11,6 +12,7 @@ from .kinds import KindId
|
||||
class Controller(Binds):
|
||||
def __init__(self):
|
||||
self.ctx = Context(StripStrategy(self, 0))
|
||||
self.bits = config.get('bits', BITS)
|
||||
|
||||
def login(self):
|
||||
retval = self.call(self.bind_login, ok=(0, 1))
|
||||
@ -40,8 +42,8 @@ class Controller(Binds):
|
||||
|
||||
def run_voicemeeter(self, kind_id):
|
||||
val = kind_id.value
|
||||
if val == 3 and BITS == 64:
|
||||
val = 6
|
||||
if self.bits == 64:
|
||||
val += 3
|
||||
self.call(self.bind_run_voicemeeter, val)
|
||||
|
||||
def __clear(self):
|
||||
|
@ -14,11 +14,6 @@ class KindId(Enum):
|
||||
@dataclass
|
||||
class KindMapClass:
|
||||
name: str
|
||||
ins: tuple
|
||||
outs: tuple
|
||||
vban: tuple
|
||||
asio: tuple
|
||||
insert: int
|
||||
|
||||
@property
|
||||
def phys_in(self) -> int:
|
||||
@ -50,7 +45,6 @@ class KindMapClass:
|
||||
|
||||
@dataclass
|
||||
class BasicMap(KindMapClass):
|
||||
name: str
|
||||
ins: tuple = (2, 1)
|
||||
outs: tuple = (1, 1)
|
||||
vban: tuple = (4, 4, 1, 1)
|
||||
@ -60,7 +54,6 @@ class BasicMap(KindMapClass):
|
||||
|
||||
@dataclass
|
||||
class BananaMap(KindMapClass):
|
||||
name: str
|
||||
ins: tuple = (3, 2)
|
||||
outs: tuple = (3, 2)
|
||||
vban: tuple = (8, 8, 1, 1)
|
||||
@ -70,7 +63,6 @@ class BananaMap(KindMapClass):
|
||||
|
||||
@dataclass
|
||||
class PotatoMap(KindMapClass):
|
||||
name: str
|
||||
ins: tuple = (5, 3)
|
||||
outs: tuple = (5, 3)
|
||||
vban: tuple = (8, 8, 1, 1)
|
||||
|
@ -28,7 +28,7 @@ addon_info = {
|
||||
The add-on requires Voicemeeter to be installed."""
|
||||
),
|
||||
# version
|
||||
'addon_version': '1.0.0',
|
||||
'addon_version': '1.1.0',
|
||||
# Author(s)
|
||||
'addon_author': 'onyx-and-iris <code@onyxandiris.online>',
|
||||
# URL for the add-on documentation support
|
||||
@ -38,7 +38,7 @@ The add-on requires Voicemeeter to be installed."""
|
||||
# Documentation file name
|
||||
'addon_docFileName': 'readme.html',
|
||||
# Minimum NVDA version supported (e.g. "2018.3.0", minor version is optional)
|
||||
'addon_minimumNVDAVersion': '2024.4.0',
|
||||
'addon_minimumNVDAVersion': '2022.1.0',
|
||||
# Last NVDA version supported/tested (e.g. "2018.4.0", ideally more recent than minimum version)
|
||||
'addon_lastTestedNVDAVersion': '2024.4.2',
|
||||
# Add-on update channel (default is None, denoting stable releases,
|
||||
|
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "nvda-addon-voicemeeter"
|
||||
version = "1.0.0"
|
||||
version = "1.1.0"
|
||||
description = "A GUI-less NVDA Addon for Voicemeeter using the Remote API"
|
||||
authors = [
|
||||
{name = "Onyx and Iris", email = "code@onyxandiris.online"},
|
||||
@ -51,8 +51,8 @@ exclude = [
|
||||
line-length = 120
|
||||
indent-width = 4
|
||||
|
||||
# Assume Python 3.10
|
||||
target-version = "py310"
|
||||
# Assume Python 3.11
|
||||
target-version = "py311"
|
||||
|
||||
[tool.ruff.lint]
|
||||
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
|
||||
|
Loading…
x
Reference in New Issue
Block a user