mirror of
https://github.com/onyx-and-iris/nvda-addon-voicemeeter.git
synced 2025-02-22 12:55:08 +00:00
read bits from config, defaults to cdll.BITS
reflect change in script_announce_voicemeeter_version
This commit is contained in:
parent
68462016a5
commit
0522b69420
@ -43,7 +43,4 @@ dll_path = vm_parent.joinpath(DLL_NAME)
|
|||||||
if not dll_path.is_file():
|
if not dll_path.is_file():
|
||||||
raise VMError(f'Could not find {dll_path}')
|
raise VMError(f'Could not find {dll_path}')
|
||||||
|
|
||||||
if BITS == 64:
|
libc = ct.WinDLL(str(dll_path))
|
||||||
libc = ct.CDLL(str(dll_path))
|
|
||||||
else:
|
|
||||||
libc = ct.WinDLL(str(dll_path))
|
|
||||||
|
@ -8,7 +8,7 @@ class CommandsMixin:
|
|||||||
### ANNOUNCEMENTS ###
|
### ANNOUNCEMENTS ###
|
||||||
|
|
||||||
def script_announce_voicemeeter_version(self, _):
|
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, _):
|
def script_announce_controller(self, _):
|
||||||
ui.message(f'Controller for {self.controller.ctx.strategy} {self.controller.ctx.index + 1}')
|
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 logHandler import log
|
||||||
|
|
||||||
|
from . import config
|
||||||
from .binds import Binds
|
from .binds import Binds
|
||||||
from .cdll import BITS
|
from .cdll import BITS
|
||||||
from .context import Context, StripStrategy
|
from .context import Context, StripStrategy
|
||||||
@ -11,6 +12,7 @@ from .kinds import KindId
|
|||||||
class Controller(Binds):
|
class Controller(Binds):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.ctx = Context(StripStrategy(self, 0))
|
self.ctx = Context(StripStrategy(self, 0))
|
||||||
|
self.bits = config.get('bits', BITS)
|
||||||
|
|
||||||
def login(self):
|
def login(self):
|
||||||
retval = self.call(self.bind_login, ok=(0, 1))
|
retval = self.call(self.bind_login, ok=(0, 1))
|
||||||
@ -40,8 +42,8 @@ class Controller(Binds):
|
|||||||
|
|
||||||
def run_voicemeeter(self, kind_id):
|
def run_voicemeeter(self, kind_id):
|
||||||
val = kind_id.value
|
val = kind_id.value
|
||||||
if val == 3 and BITS == 64:
|
if self.bits == 64:
|
||||||
val = 6
|
val += 3
|
||||||
self.call(self.bind_run_voicemeeter, val)
|
self.call(self.bind_run_voicemeeter, val)
|
||||||
|
|
||||||
def __clear(self):
|
def __clear(self):
|
||||||
|
@ -14,11 +14,6 @@ class KindId(Enum):
|
|||||||
@dataclass
|
@dataclass
|
||||||
class KindMapClass:
|
class KindMapClass:
|
||||||
name: str
|
name: str
|
||||||
ins: tuple
|
|
||||||
outs: tuple
|
|
||||||
vban: tuple
|
|
||||||
asio: tuple
|
|
||||||
insert: int
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def phys_in(self) -> int:
|
def phys_in(self) -> int:
|
||||||
@ -50,7 +45,6 @@ class KindMapClass:
|
|||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class BasicMap(KindMapClass):
|
class BasicMap(KindMapClass):
|
||||||
name: str
|
|
||||||
ins: tuple = (2, 1)
|
ins: tuple = (2, 1)
|
||||||
outs: tuple = (1, 1)
|
outs: tuple = (1, 1)
|
||||||
vban: tuple = (4, 4, 1, 1)
|
vban: tuple = (4, 4, 1, 1)
|
||||||
@ -60,7 +54,6 @@ class BasicMap(KindMapClass):
|
|||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class BananaMap(KindMapClass):
|
class BananaMap(KindMapClass):
|
||||||
name: str
|
|
||||||
ins: tuple = (3, 2)
|
ins: tuple = (3, 2)
|
||||||
outs: tuple = (3, 2)
|
outs: tuple = (3, 2)
|
||||||
vban: tuple = (8, 8, 1, 1)
|
vban: tuple = (8, 8, 1, 1)
|
||||||
@ -70,7 +63,6 @@ class BananaMap(KindMapClass):
|
|||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class PotatoMap(KindMapClass):
|
class PotatoMap(KindMapClass):
|
||||||
name: str
|
|
||||||
ins: tuple = (5, 3)
|
ins: tuple = (5, 3)
|
||||||
outs: tuple = (5, 3)
|
outs: tuple = (5, 3)
|
||||||
vban: tuple = (8, 8, 1, 1)
|
vban: tuple = (8, 8, 1, 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user