mirror of
https://github.com/onyx-and-iris/voicemeeter-api-python.git
synced 2026-04-18 04:33:29 +00:00
clean up some format strings
expand obs example
This commit is contained in:
@@ -116,7 +116,7 @@ class PhysicalBus(Bus):
|
||||
if kind.name == "potato":
|
||||
EFFECTS_cls = _make_effects_mixin()
|
||||
kls += (EFFECTS_cls,)
|
||||
return type(f"PhysicalBus", kls, {})
|
||||
return type("PhysicalBus", kls, {})
|
||||
|
||||
def __str__(self):
|
||||
return f"{type(self).__name__}{self.index}"
|
||||
@@ -146,7 +146,7 @@ class VirtualBus(Bus):
|
||||
elif kind.name == "potato":
|
||||
EFFECTS_cls = _make_effects_mixin()
|
||||
kls += (EFFECTS_cls,)
|
||||
return type(f"VirtualBus", kls, {})
|
||||
return type("VirtualBus", kls, {})
|
||||
|
||||
def __str__(self):
|
||||
return f"{type(self).__name__}{self.index}"
|
||||
@@ -164,15 +164,15 @@ class BusLevel(IRemote):
|
||||
If observables thread running fetch values from cache otherwise call CAPI func.
|
||||
"""
|
||||
|
||||
def fget(i):
|
||||
return round(20 * log(i, 10), 1) if i > 0 else -200.0
|
||||
def fget(x):
|
||||
return round(20 * log(x, 10), 1) if x > 0 else -200.0
|
||||
|
||||
if self._remote.running and "bus_level" in self._remote.cache:
|
||||
vals = self._remote.cache["bus_level"][self.range[0] : self.range[-1]]
|
||||
else:
|
||||
vals = [self._remote.get_level(mode, i) for i in range(*self.range)]
|
||||
|
||||
return tuple(fget(i) for i in vals)
|
||||
return tuple(fget(val) for val in vals)
|
||||
|
||||
@property
|
||||
def identifier(self) -> str:
|
||||
|
||||
Reference in New Issue
Block a user