mirror of
https://github.com/onyx-and-iris/duckypad-twitch.git
synced 2026-01-09 13:07:47 +00:00
Compare commits
2 Commits
e6d9092562
...
bb10786b94
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb10786b94 | ||
| f94936777a |
@ -22,6 +22,7 @@ class Audio(ILayer):
|
||||
super().__init__(duckypad)
|
||||
for attr, val in kwargs.items():
|
||||
setattr(self, attr, val)
|
||||
self.vm.observer.add(self.on_mdirty)
|
||||
|
||||
self.reset_states()
|
||||
|
||||
@ -42,6 +43,12 @@ class Audio(ILayer):
|
||||
for button in Buttons:
|
||||
self.vm.button[button].stateonly = getattr(AudioState, button.name)
|
||||
|
||||
def on_mdirty(self):
|
||||
"""Handle Voicemeeter dirty event"""
|
||||
self.logger.debug('Voicemeeter state changed (mdirty event)')
|
||||
for button in Buttons:
|
||||
setattr(self.state, button.name, self.vm.button[button].stateonly)
|
||||
|
||||
def mute_mics(self):
|
||||
self.state.mute_mics = not self.state.mute_mics
|
||||
if self.state.mute_mics:
|
||||
@ -73,11 +80,13 @@ class Audio(ILayer):
|
||||
self.vm.bus[VMBuses.iris_mic].mute = True
|
||||
self.vm.strip[VMStrips.onyx_pc].gain = -3
|
||||
self.vm.strip[VMStrips.iris_pc].gain = -3
|
||||
self.vm.strip[VMStrips.comms].gain = -6
|
||||
self.vm.strip[VMStrips.pretzel].gain = -3
|
||||
self.logger.info('Only Stream Enabled')
|
||||
else:
|
||||
self.vm.strip[VMStrips.onyx_pc].gain = 0
|
||||
self.vm.strip[VMStrips.iris_pc].gain = 0
|
||||
self.vm.strip[VMStrips.comms].gain = 0
|
||||
self.vm.strip[VMStrips.pretzel].gain = 0
|
||||
self.vm.bus[VMBuses.onyx_mic].mute = False
|
||||
self.vm.bus[VMBuses.iris_mic].mute = False
|
||||
|
||||
@ -58,7 +58,7 @@ def run():
|
||||
xair_config = configuration.get('xair')
|
||||
|
||||
with (
|
||||
voicemeeterlib.api('potato') as vm,
|
||||
voicemeeterlib.api('potato', mdirty=True) as vm,
|
||||
xair_api.connect('MR18', **xair_config) as mixer,
|
||||
duckypad_twitch.connect(vm=vm, mixer=mixer) as duckypad,
|
||||
):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user