mirror of
https://github.com/onyx-and-iris/voicemeeter-api-python.git
synced 2025-04-20 03:53:44 +01:00
Compare commits
No commits in common. "fd571d3b378ff42dfe06d3df31b242bc7fb6e3de" and "c9f5b680ce3ad444b203ac6a9fbc86f2c0142d81" have entirely different histories.
fd571d3b37
...
c9f5b680ce
11
CHANGELOG.md
11
CHANGELOG.md
@ -11,17 +11,6 @@ Before any major/minor/patch bump all unit tests will be run to verify they pass
|
||||
|
||||
- [x]
|
||||
|
||||
## [2.6.0] - 2024-06-29
|
||||
|
||||
### Added
|
||||
|
||||
- bits kwarg for overriding the type of GUI that is launched on startup.
|
||||
- Defaults to 64, set it to either 32 or 64.
|
||||
|
||||
### Fixed
|
||||
|
||||
- {Remote}.run_voicemeeter() now launches x64 bit GUI's for all kinds if Python detects a 64 bit system.
|
||||
|
||||
## [2.5.0] - 2023-10-27
|
||||
|
||||
### Fixed
|
||||
|
@ -814,7 +814,6 @@ You may pass the following optional keyword arguments:
|
||||
- `midi`: boolean=False, midi updates
|
||||
- `ldirty`: boolean=False, level updates
|
||||
- `timeout`: float=2.0, maximum time to wait for a successful login in seconds
|
||||
- `bits`: int=64, (may be one of 32 or 64), overrides the type of Voicemeeter GUI {Remote}.run_voicemeeter() will launch
|
||||
|
||||
Access to lower level Getters and Setters are provided with these functions:
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "voicemeeter-api"
|
||||
version = "2.6.0"
|
||||
version = "2.5.4"
|
||||
description = "A Python wrapper for the Voiceemeter API"
|
||||
authors = ["onyx-and-iris <code@onyxandiris.online>"]
|
||||
license = "MIT"
|
||||
|
@ -115,7 +115,6 @@ class FactoryBase(Remote):
|
||||
"midi": False,
|
||||
"ldirty": False,
|
||||
"timeout": 2,
|
||||
"bits": 64,
|
||||
}
|
||||
if "subs" in kwargs:
|
||||
defaultkwargs |= kwargs.pop("subs") # for backwards compatibility
|
||||
|
@ -5,7 +5,7 @@ from pathlib import Path
|
||||
|
||||
from .error import InstallError
|
||||
|
||||
BITS = 64 if ct.sizeof(ct.c_void_p) == 8 else 32
|
||||
bits = 64 if ct.sizeof(ct.c_voidp) == 8 else 32
|
||||
|
||||
if platform.system() != "Windows":
|
||||
raise InstallError("Only Windows OS supported")
|
||||
@ -17,7 +17,7 @@ REG_KEY = "\\".join(
|
||||
None,
|
||||
(
|
||||
"SOFTWARE",
|
||||
"WOW6432Node" if BITS == 64 else "",
|
||||
"WOW6432Node" if bits == 64 else "",
|
||||
"Microsoft",
|
||||
"Windows",
|
||||
"CurrentVersion",
|
||||
@ -39,7 +39,7 @@ try:
|
||||
except FileNotFoundError as e:
|
||||
raise InstallError("Unable to fetch DLL path from the registry") from e
|
||||
|
||||
DLL_NAME = f'VoicemeeterRemote{"64" if BITS == 64 else ""}.dll'
|
||||
DLL_NAME = f'VoicemeeterRemote{"64" if bits == 64 else ""}.dll'
|
||||
|
||||
dll_path = vm_parent.joinpath(DLL_NAME)
|
||||
if not dll_path.is_file():
|
||||
|
@ -9,7 +9,7 @@ from typing import Iterable, Optional, Union
|
||||
from .cbindings import CBindings
|
||||
from .error import CAPIError, VMError
|
||||
from .event import Event
|
||||
from .inst import BITS
|
||||
from .inst import bits
|
||||
from .kinds import KindId
|
||||
from .misc import Midi, VmGui
|
||||
from .subject import Subject
|
||||
@ -39,12 +39,6 @@ class Remote(CBindings):
|
||||
for attr, val in kwargs.items():
|
||||
setattr(self, attr, val)
|
||||
|
||||
if self.bits not in (32, 64):
|
||||
self.logger.warning(
|
||||
f"kwarg bits got {self.bits}, expected either 32 or 64, defaulting to 64"
|
||||
)
|
||||
self.bits = 64
|
||||
|
||||
def __enter__(self):
|
||||
"""setup procedures"""
|
||||
self.login()
|
||||
@ -86,9 +80,10 @@ class Remote(CBindings):
|
||||
def run_voicemeeter(self, kind_id: str) -> None:
|
||||
if kind_id not in (kind.name.lower() for kind in KindId):
|
||||
raise VMError(f"Unexpected Voicemeeter type: '{kind_id}'")
|
||||
value = KindId[kind_id.upper()].value
|
||||
if BITS == 64 and self.bits == 64:
|
||||
value += 3
|
||||
if kind_id == "potato" and bits == 64:
|
||||
value = KindId[kind_id.upper()].value + 3
|
||||
else:
|
||||
value = KindId[kind_id.upper()].value
|
||||
self.call(self.bind_run_voicemeeter, value)
|
||||
|
||||
@property
|
||||
|
Loading…
x
Reference in New Issue
Block a user