mirror of
https://github.com/onyx-and-iris/voicemeeter-api-python.git
synced 2024-11-16 00: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]
|
[tool.poetry]
|
||||||
name = "voicemeeter-api"
|
name = "voicemeeter-api"
|
||||||
version = "0.1.8"
|
version = "0.1.9"
|
||||||
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"
|
||||||
|
@ -50,15 +50,7 @@ class Remote(CBindings):
|
|||||||
if self.ldirty:
|
if self.ldirty:
|
||||||
self._strip_levels = self.strip_buf
|
self._strip_levels = self.strip_buf
|
||||||
self._bus_levels = self.bus_buf
|
self._bus_levels = self.bus_buf
|
||||||
self.subject.notify(
|
self.subject.notify("ldirty")
|
||||||
"ldirty",
|
|
||||||
(
|
|
||||||
self._strip_levels,
|
|
||||||
self._strip_comp,
|
|
||||||
self._bus_levels,
|
|
||||||
self._bus_comp,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
time.sleep(self.ratelimit)
|
time.sleep(self.ratelimit)
|
||||||
|
|
||||||
def login(self) -> NoReturn:
|
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))
|
self.vm_get_level(ct.c_long(type_), ct.c_long(index), ct.byref(val))
|
||||||
return val.value
|
return val.value
|
||||||
|
|
||||||
|
@property
|
||||||
|
def strip_levels(self):
|
||||||
|
return self._strip_levels
|
||||||
|
|
||||||
|
@property
|
||||||
|
def bus_levels(self):
|
||||||
|
return self._bus_levels
|
||||||
|
|
||||||
@script
|
@script
|
||||||
def sendtext(self, script: str):
|
def sendtext(self, script: str):
|
||||||
"""Sets many parameters from a script"""
|
"""Sets many parameters from a script"""
|
||||||
|
@ -12,10 +12,10 @@ class Subject:
|
|||||||
|
|
||||||
return self._observers
|
return self._observers
|
||||||
|
|
||||||
def notify(self, modifier=None, data=None):
|
def notify(self, modifier=None):
|
||||||
"""run callbacks on update"""
|
"""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):
|
def add(self, observer):
|
||||||
"""adds an observer to _observers"""
|
"""adds an observer to _observers"""
|
||||||
|
Loading…
Reference in New Issue
Block a user