Add mic ON/OFF toggle, headphone and studio output busses
- Channels 0-1 are now dedicated Mic 1/Mic 2 with mic_on toggle - Mic audio only routes to main when mic_on=True, never to headphone - New headphone_out_L/R JACK ports (all channels except mics) - New studio_out_L/R JACK ports (copies main, mutes when any mic is on) - Mic ON/OFF toggle button in mixer UI (hidden on non-mic channels) - Session save/load includes mic_on state
This commit is contained in:
+32
-1
@@ -9,7 +9,7 @@ from PySide6.QtCore import Qt, QTimer, QSize
|
||||
from PySide6.QtGui import QFont, QPainter, QColor, QLinearGradient, QPen
|
||||
|
||||
from audio_engine import NUM_MIXER_CHANNELS
|
||||
from icons import icon_mute, icon_solo
|
||||
from icons import icon_mute, icon_solo, icon_mic
|
||||
import math
|
||||
|
||||
|
||||
@@ -214,6 +214,28 @@ class ChannelStrip(QFrame):
|
||||
""")
|
||||
btn_row.addWidget(self.solo_btn)
|
||||
|
||||
# Mic ON/OFF button for channels 0 and 1
|
||||
self.mic_btn = QPushButton()
|
||||
self.mic_btn.setFixedSize(28, 24)
|
||||
self.mic_btn.setIconSize(QSize(16, 16))
|
||||
self.mic_btn.setIcon(icon_mic("#888"))
|
||||
self.mic_btn.setCheckable(True)
|
||||
self.mic_btn.setToolTip("Mic ON – audio goes to main")
|
||||
self.mic_btn.setStyleSheet("""
|
||||
QPushButton {
|
||||
background-color: #202426;
|
||||
border: 1px solid #303a3a;
|
||||
border-radius: 3px;
|
||||
}
|
||||
QPushButton:checked {
|
||||
background-color: #1a3a1a;
|
||||
border: 1px solid #00cc66;
|
||||
}
|
||||
QPushButton:hover { background-color: #303436; }
|
||||
""")
|
||||
self.mic_btn.setVisible(self.channel_index < 2)
|
||||
btn_row.addWidget(self.mic_btn)
|
||||
|
||||
self.pfl_btn = QPushButton("PFL")
|
||||
self.pfl_btn.setFixedSize(28, 24)
|
||||
self.pfl_btn.setFont(QFont("Segoe UI", 7, QFont.Bold))
|
||||
@@ -242,6 +264,7 @@ class ChannelStrip(QFrame):
|
||||
self.volume_slider.valueChanged.connect(self._on_volume_changed)
|
||||
self.mute_btn.toggled.connect(self._on_mute_toggled)
|
||||
self.solo_btn.toggled.connect(self._on_solo_toggled)
|
||||
self.mic_btn.toggled.connect(self._on_mic_toggled)
|
||||
self.pfl_btn.toggled.connect(self._on_pfl_toggled)
|
||||
|
||||
def _rename(self):
|
||||
@@ -266,9 +289,17 @@ class ChannelStrip(QFrame):
|
||||
def _on_pfl_toggled(self, checked: bool):
|
||||
self.engine.set_channel_pfl(self.channel_index, checked)
|
||||
|
||||
def _on_mic_toggled(self, checked: bool):
|
||||
self.engine.set_channel_mic_on(self.channel_index, checked)
|
||||
color = "#00cc66" if checked else "#888"
|
||||
self.mic_btn.setIcon(icon_mic(color))
|
||||
|
||||
def _refresh(self):
|
||||
self.vu_meter.set_value(self._channel.vu_peak)
|
||||
self.volume_slider.setValue(int(math.sqrt(self._channel.volume) * 100))
|
||||
if self.channel_index < 2:
|
||||
color = "#00cc66" if self._channel.mic_on else "#888"
|
||||
self.mic_btn.setIcon(icon_mic(color))
|
||||
|
||||
|
||||
class MasterPreSection(QFrame):
|
||||
|
||||
Reference in New Issue
Block a user