fix error in cbindings.

fix error in cbindings.
This commit is contained in:
onyx-and-iris 2022-06-17 17:51:57 +01:00
parent 9cb5093cc9
commit 43de864a83
3 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "voicemeeter-api" name = "voicemeeter-api"
version = "0.1.6" version = "0.1.7"
description = "A Python wrapper for the Voiceemeter API" description = "A Python wrapper for the Voiceemeter API"
authors = ["onyx-and-iris <code@onyxandiris.online>"] authors = ["onyx-and-iris <code@onyxandiris.online>"]
license = "MIT" license = "MIT"

View File

@ -233,8 +233,8 @@ class Remote(CBindings):
"""Sets many parameters from a script""" """Sets many parameters from a script"""
if len(script) > 48000: if len(script) > 48000:
raise ValueError("Script too large, max size 48kB") raise ValueError("Script too large, max size 48kB")
self.call(partial(self.vm_set_parameter_multi, script)) self.call(partial(self.vm_set_parameter_multi, script.encode()))
time.sleep(self.DELAY) time.sleep(self.DELAY * 5)
def apply(self, data: dict): def apply(self, data: dict):
""" """

View File

@ -67,7 +67,7 @@ class CBindings(metaclass=ABCMeta):
vm_set_parameter_multi = libc.VBVMR_SetParameters vm_set_parameter_multi = libc.VBVMR_SetParameters
vm_set_parameter_multi.restype = LONG vm_set_parameter_multi.restype = LONG
vm_set_parameter_multi.argtypes = [ct.POINTER(CHAR), ct.POINTER(CHAR)] vm_set_parameter_multi.argtypes = [ct.POINTER(CHAR)]
vm_get_level = libc.VBVMR_GetLevel vm_get_level = libc.VBVMR_GetLevel
vm_get_level.restype = LONG vm_get_level.restype = LONG