mirror of
https://github.com/onyx-and-iris/voicemeeter-api-python.git
synced 2026-04-19 04:53:32 +00:00
Event class added to misc.
defaultkwarg subs added. iniitialize event subscriptions. base class observable thread now checks for currently registered events. make capi call if polling strip/bus levels and ldirty not in events.
This commit is contained in:
@@ -161,13 +161,15 @@ class BusLevel(IRemote):
|
||||
"""
|
||||
Returns a tuple of level values for the channel.
|
||||
|
||||
If observables thread running fetch values from cache otherwise call CAPI func.
|
||||
If observables thread running and level updates are subscribed to, fetch values from cache
|
||||
|
||||
Otherwise call CAPI func.
|
||||
"""
|
||||
|
||||
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:
|
||||
if self._remote.running and self._remote.event.ldirty:
|
||||
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)]
|
||||
|
||||
Reference in New Issue
Block a user