Skip to content

DlgPrefMixer: add option to reset EQ kill switches on track load - #16796

Open
gary-gdbsystems wants to merge 3 commits into
mixxxdj:mainfrom
gary-gdbsystems:mixer-reset-eq-kill-pref
Open

DlgPrefMixer: add option to reset EQ kill switches on track load#16796
gary-gdbsystems wants to merge 3 commits into
mixxxdj:mainfrom
gary-gdbsystems:mixer-reset-eq-kill-pref

Conversation

@gary-gdbsystems

@gary-gdbsystems gary-gdbsystems commented Jul 29, 2026

Copy link
Copy Markdown

Summary

Resolves #10684.

Previously "Reset equalizers on track load" also reset the EQ kill switches, so there was no way to reset the kill switches independently of the EQ knobs — the request in this issue.

Approach

Add a separate "Reset EQ kill switches on track load" option ([Mixer Profile]/EqKillAutoReset) and decouple the reset logic in BaseTrackPlayerImpl::slotLoadTrack():

  • EqAutoReset → resets the EQ knobs
  • EqAutoReset or EqKillAutoReset → resets the kill switches

Backward compatible: users who had EqAutoReset enabled still get their kill switches reset (via the ||), and the new key defaults off, so nothing changes until it is enabled.

UI coupling

Following @JosepMaJAZ's proposal in the thread (which @ronso0 endorsed), the kill-switch checkbox is forced on and disabled while "Reset equalizers on track load" is active, because resetting the equalizers inherently resets the kill switches. The user's own kill-switch setting is preserved and restored when equalizer reset is turned off again.

I chose the coupled variant over three fully independent checkboxes because it is backward compatible — a fully independent design would silently stop resetting kill switches for existing EqAutoReset users unless their config were migrated. Happy to adjust if maintainers prefer otherwise.

Changes

  • src/mixer/basetrackplayer.cpp — decouple knob vs kill-switch reset; read the new config key.
  • src/preferences/dialog/dlgprefmixer.{cpp,h} — new checkbox load/save/default wiring + coupling logic.
  • src/preferences/dialog/dlgprefmixerdlg.ui — new checkbox.

Screenshots

Before — EQ / gain / stem reset options:

before

After (default) — new independent "Reset EQ kill switches on track load":

after default

After (coupled) — with "Reset equalizers" enabled, the kill option is forced on and locked:

after coupled

Testing

  • Builds cleanly (incl. uic regeneration of the dialog).
  • clang-format, clang-tidy, and the other pre-commit hooks pass.
  • Verified the checkbox wiring, coupling behavior, and reset decoupling by code inspection; the existing reset-on-load behavior has no unit-test harness.

Previously "Reset equalizers on track load" also reset the EQ kill
switches, with no way to reset the kill switches independently. Add a
separate "Reset EQ kill switches on track load" option and decouple the
reset logic in BaseTrackPlayerImpl::slotLoadTrack():

  - EqAutoReset resets the EQ knobs
  - EqAutoReset OR EqKillAutoReset resets the kill switches

This keeps existing behavior: users who had EqAutoReset enabled still get
their kill switches reset, and the new key defaults off so nothing
changes until it is enabled.

Following the design discussed in the issue, the kill-switch checkbox is
forced on and disabled while "Reset equalizers on track load" is active
(since resetting the equalizers inherently resets the kill switches); the
user's own setting is preserved and restored when equalizer reset is
turned off again.

Resolves mixxxdj#10684.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The new EQ-kill-reset checkbox was missing from the dialog's explicit
<tabstops> order (so keyboard Tab skipped it) and the parent layout's
stretch list still had 7 entries for 8 items. Add the tabstop between
the EQ and gain reset checkboxes and extend the stretch list to 8.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@acolombier acolombier added the AI The issue or PR makes heavy use of AI, which requires extra attention and effort to review label Jul 30, 2026

@cr7pt0gr4ph7 cr7pt0gr4ph7 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, except for the small nitpick about option naming.

If the feature itself is desirable (and I don't see why not) then this should be ready for merging.

<string>Resets the EQ kill switches when loading a track. This is always enabled while &quot;Reset equalizers on track load&quot; is active, because resetting the equalizers also resets the kill switches.</string>
</property>
<property name="text">
<string>Reset EQ kill switches on track load</string>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For symmetry with "Reset equalizers on track load":

Suggested change
<string>Reset EQ kill switches on track load</string>
<string>Reset equalizer kill switches on track load</string>

Review feedback: use "Reset equalizer kill switches on track load" for
symmetry with the sibling "Reset equalizers on track load" checkbox.
Update the tooltip wording to match.
@gary-gdbsystems

Copy link
Copy Markdown
Author

Thanks. Renamed to "Reset equalizer kill switches on track load" and updated the tooltip to match. Screenshot updated.

Comment on lines +1078 to +1081
void DlgPrefMixer::updateEqKillAutoResetState() {
const bool eqReset = CheckBoxEqAutoReset->isChecked();
CheckBoxEqKillAutoReset->setEnabled(!eqReset);
CheckBoxEqKillAutoReset->setChecked(eqReset || m_eqKillAutoReset);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason not to use m_eqAutoReset which is set above when the EQ checkbox is toggled?

Suggested change
void DlgPrefMixer::updateEqKillAutoResetState() {
const bool eqReset = CheckBoxEqAutoReset->isChecked();
CheckBoxEqKillAutoReset->setEnabled(!eqReset);
CheckBoxEqKillAutoReset->setChecked(eqReset || m_eqKillAutoReset);
void DlgPrefMixer::updateEqKillAutoResetState() {
CheckBoxEqKillAutoReset->setEnabled(!m_eqAutoReset);
CheckBoxEqKillAutoReset->setChecked(m_eqAutoReset || m_eqKillAutoReset);

@ronso0

ronso0 commented Aug 14, 2026

Copy link
Copy Markdown
Member

Thank you for this nice addition @gary-gdbsystems
Code mostly LGTM (see my comment). Manual test still pending.

Here's the paperwork:
As a first-time contributor we need you to sign the Mixxx Contributor Agreement and comment here when you have done so. It gives us permission to distribute your contribution under the GPL v2 or later license and the Apple Mac App Store. It is also helpful for us to have contact information for contributors in case we may need it in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI The issue or PR makes heavy use of AI, which requires extra attention and effort to review preferences ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

proposal: reset EQ Kill buttons on track load

4 participants