mirror of
https://github.com/onyx-and-iris/voicemeeter-api-python.git
synced 2024-11-15 16:40:46 +00:00
changes to observers thread.
minor version bump
This commit is contained in:
parent
56d26d6bde
commit
d951c5efce
@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "voicemeeter-api"
|
||||
version = "0.1.8"
|
||||
version = "0.1.9"
|
||||
description = "A Python wrapper for the Voiceemeter API"
|
||||
authors = ["onyx-and-iris <code@onyxandiris.online>"]
|
||||
license = "MIT"
|
||||
|
@ -50,15 +50,7 @@ class Remote(CBindings):
|
||||
if self.ldirty:
|
||||
self._strip_levels = self.strip_buf
|
||||
self._bus_levels = self.bus_buf
|
||||
self.subject.notify(
|
||||
"ldirty",
|
||||
(
|
||||
self._strip_levels,
|
||||
self._strip_comp,
|
||||
self._bus_levels,
|
||||
self._bus_comp,
|
||||
),
|
||||
)
|
||||
self.subject.notify("ldirty")
|
||||
time.sleep(self.ratelimit)
|
||||
|
||||
def login(self) -> NoReturn:
|
||||
@ -228,6 +220,14 @@ class Remote(CBindings):
|
||||
self.vm_get_level(ct.c_long(type_), ct.c_long(index), ct.byref(val))
|
||||
return val.value
|
||||
|
||||
@property
|
||||
def strip_levels(self):
|
||||
return self._strip_levels
|
||||
|
||||
@property
|
||||
def bus_levels(self):
|
||||
return self._bus_levels
|
||||
|
||||
@script
|
||||
def sendtext(self, script: str):
|
||||
"""Sets many parameters from a script"""
|
||||
|
@ -12,10 +12,10 @@ class Subject:
|
||||
|
||||
return self._observers
|
||||
|
||||
def notify(self, modifier=None, data=None):
|
||||
def notify(self, modifier=None):
|
||||
"""run callbacks on update"""
|
||||
|
||||
[o.on_update(modifier, data) for o in self._observers]
|
||||
[o.on_update(modifier) for o in self._observers]
|
||||
|
||||
def add(self, observer):
|
||||
"""adds an observer to _observers"""
|
||||
|
Loading…
Reference in New Issue
Block a user