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():
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user