mirror of
https://github.com/onyx-and-iris/duckypad-twitch.git
synced 2025-03-31 10:51:15 +01:00
add fade in/out logic to toggle_workstation_to_onyx()
This commit is contained in:
parent
8fd35408d5
commit
ed890ab9e7
@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2023-present onyx-and-iris <75868496+onyx-and-iris@users.noreply.github.com>
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
__version__ = '1.0.5'
|
||||
__version__ = '1.0.6'
|
||||
|
@ -1,6 +1,7 @@
|
||||
import logging
|
||||
from enum import IntEnum
|
||||
|
||||
import time
|
||||
import vban_cmd
|
||||
|
||||
from . import configuration
|
||||
@ -140,8 +141,22 @@ class Audio(ILayer):
|
||||
vban.vban.instream[0].on = True
|
||||
self.vm.strip[5].gain = -6
|
||||
self.vm.vban.outstream[2].on = True
|
||||
|
||||
# Fade out the workstation
|
||||
current_fader = self.mixer.lr.mix.fader
|
||||
while current_fader > -90:
|
||||
current_fader -= 1
|
||||
self.mixer.lr.mix.fader = current_fader
|
||||
time.sleep(0.05)
|
||||
else:
|
||||
with vban_cmd.api('potato', outbound=True, **onyx_conn) as vban:
|
||||
vban.vban.instream[0].on = False
|
||||
self.vm.strip[5].gain = 0
|
||||
self.vm.vban.outstream[2].on = False
|
||||
|
||||
# Fade in the workstation
|
||||
current_fader = self.mixer.lr.mix.fader
|
||||
while current_fader < -36:
|
||||
current_fader += 1
|
||||
self.mixer.lr.mix.fader = current_fader
|
||||
time.sleep(0.05)
|
||||
|
@ -94,7 +94,6 @@ exclude = [
|
||||
"venv",
|
||||
]
|
||||
|
||||
# Same as Black.
|
||||
line-length = 120
|
||||
indent-width = 4
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user