upd workstation routing

This commit is contained in:
Onyx and Iris 2026-01-02 00:35:34 +00:00
parent 14de454ac9
commit 71994baa7a

View File

@ -1,12 +1,12 @@
import logging import logging
import time import time
import vban_cmd import vban_cmd
from . import configuration from . import configuration
from .enums import Buttons, Strips
from .layer import ILayer from .layer import ILayer
from .states import AudioState from .states import AudioState
from .enums import Buttons, Strips
from .util import ensure_mixer_fadeout from .util import ensure_mixer_fadeout
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -189,16 +189,16 @@ class Audio(ILayer):
if new_state: if new_state:
with vban_cmd.api('potato', outbound=True, **target_conn) as vban: with vban_cmd.api('potato', outbound=True, **target_conn) as vban:
vban.vban.instream[1].on = True vban.vban.instream[2].on = True
self.vm.strip[5].gain = -6 self.vm.strip[5].gain = -6
self.vm.vban.outstream[2].on = True self.vm.vban.outstream[3].on = True
self._fade_mixer(-90, fade_in=False) self._fade_mixer(-90, fade_in=False)
self.logger.info(f'Workstation audio routed to {target_name}') self.logger.info(f'Workstation audio routed to {target_name}')
else: else:
with vban_cmd.api('potato', outbound=True, **target_conn) as vban: with vban_cmd.api('potato', outbound=True, **target_conn) as vban:
vban.vban.instream[0].on = False vban.vban.instream[2].on = False
self.vm.strip[5].gain = 0 self.vm.strip[5].gain = 0
self.vm.vban.outstream[2].on = False self.vm.vban.outstream[3].on = False
self._fade_mixer(-36, fade_in=True) self._fade_mixer(-36, fade_in=True)
self.logger.info('Workstation audio routed back to monitor speakers') self.logger.info('Workstation audio routed back to monitor speakers')