mirror of
https://github.com/onyx-and-iris/voicemeeter-api-python.git
synced 2024-11-16 00:40:46 +00:00
update bool parser
This commit is contained in:
parent
f69a8cff6b
commit
316a5bded5
@ -44,8 +44,8 @@ class Parser:
|
|||||||
kls = "".join(kls)
|
kls = "".join(kls)
|
||||||
index = int(*index)
|
index = int(*index)
|
||||||
target = getattr(self.vm, kls)[index]
|
target = getattr(self.vm, kls)[index]
|
||||||
if val in ["on", "off"]:
|
if val in ["off", "on"]:
|
||||||
setattr(target, param, 1 if val == "on" else 0)
|
setattr(target, param, bool(["off", "on"].index(val)))
|
||||||
if param in ["gain", "comp", "gate", "limit", "audibility"]:
|
if param in ["gain", "comp", "gate", "limit", "audibility"]:
|
||||||
setattr(target, param, float(val))
|
setattr(target, param, float(val))
|
||||||
if param in ["label"]:
|
if param in ["label"]:
|
||||||
|
Loading…
Reference in New Issue
Block a user