mirror of
https://github.com/onyx-and-iris/voicemeeter-api-python.git
synced 2024-11-15 16:40:46 +00:00
mdirty added to updates
using walrus operator in examples
This commit is contained in:
parent
771bc223ac
commit
51390236c3
@ -63,16 +63,12 @@ def main(cmds=None):
|
|||||||
if res:
|
if res:
|
||||||
print(res)
|
print(res)
|
||||||
else:
|
else:
|
||||||
try:
|
while cmd := input("Please enter command (Press <Enter> to exit)\n"):
|
||||||
while True:
|
|
||||||
cmd = input("please enter command (Return to exit)\n")
|
|
||||||
if not cmd:
|
if not cmd:
|
||||||
break
|
break
|
||||||
res = parser.parse((cmd,))
|
res = parser.parse((cmd,))
|
||||||
if res:
|
if res:
|
||||||
print(res)
|
print(res)
|
||||||
except KeyboardInterrupt as e:
|
|
||||||
SystemExit(e)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
@ -99,4 +95,4 @@ if __name__ == "__main__":
|
|||||||
)
|
)
|
||||||
|
|
||||||
# pass cmds to parse cmds, otherwise simply run main() to test stdin parsing
|
# pass cmds to parse cmds, otherwise simply run main() to test stdin parsing
|
||||||
main(cmds)
|
main()
|
||||||
|
@ -14,13 +14,9 @@ def main():
|
|||||||
obs = Observer(vm)
|
obs = Observer(vm)
|
||||||
vm.subject.add(obs)
|
vm.subject.add(obs)
|
||||||
|
|
||||||
try:
|
while cmd := input("Press <Enter> to exit\n"):
|
||||||
while True:
|
|
||||||
cmd = input("Press Return to exit\n")
|
|
||||||
if not cmd:
|
if not cmd:
|
||||||
break
|
break
|
||||||
except KeyboardInterrupt as e:
|
|
||||||
SystemExit(e)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
@ -47,6 +47,8 @@ class Remote(CBindings):
|
|||||||
while self.running:
|
while self.running:
|
||||||
if self.pdirty:
|
if self.pdirty:
|
||||||
self.subject.notify("pdirty")
|
self.subject.notify("pdirty")
|
||||||
|
if self.mdirty:
|
||||||
|
self.subject.notify("mdirty")
|
||||||
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
|
||||||
|
Loading…
Reference in New Issue
Block a user