opening preferences resets deck eq knobs

Bug #1406610 reported by RJ Skerry-Ryan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
High
Owen Williams

Bug Description

Something is likely doing engine-changing work in the slotUpdate call.

RJ Skerry-Ryan (rryan)
Changed in mixxx:
importance: Undecided → High
status: New → Confirmed
milestone: none → 1.12.0
Revision history for this message
Owen Williams (ywwg) wrote :

This is because applySelections() is getting called when the prefs window opens, and reloading the EQ effects resets the knobs.

The thing to do would be to check that the currently-loaded effect matches the configured effect, but I can't figure out how to get the id of an instantiated effect. the getId method is static per-GroupEffectProcessor, and that isn't exposed in the parent classes because you can't have static virtual methods. I think the solution is to make getId not static, then I can do a crazy call in dlgprefeq like:

QString current_effect = m_pEQEffectRack->getEffectChainSlot(deck)->getEffectSlot(0)->getEffect()->getEngineEffect()->getId();

(obviously checking for null pointers along the way)

Revision history for this message
Daniel Schürmann (daschuer) wrote :

> This is because applySelections() is getting called when the prefs window opens, and reloading the EQ effects resets the knobs.

Why not fixing that? This seams to be an issue for all preference panes.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Right -- engine changing work should not be done in slotUpdate.

The way preferences functions are designed to work:

slotUpdate -> update the GUI widgets to match internal engine state
slotApply -> take the GUI widget state and apply them to the engine
slotCancel -> all changes to the GUI widget state since that last slotUpdate call are reverted (typically not implemented since the next slotUpdate will revert them)
slotResetToDefaults -> change GUI widgets to the defaults.

slotShow -> preferences dialog is shown (for starting timers e.g. the waveform measurement timer)
slotHide -> preferences dialog is hidden (for stopping timers, etc.)

DlgPrefEq is kind of an odd ball here since changes made affect the engine instantly (they don't need the user to hit apply). However, we should still not do engine changing work in slotUpdate.

Revision history for this message
Owen Williams (ywwg) wrote :

If we want to update the gui widgets to match internal engine state, then there needs to be some way to introspect a loaded effect to figure out what it is. If you have any guidance on the issue I raised above (static method problems) let me know, otherwise I will just barrel ahead with an attempt.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Whoops, I didn't read your comment that closely -- you can get the ID from the manifest with something similar to what you posted:

m_pEQEffectRack->getEffectChainSlot(deck)->getEffectSlot(0)->getEffect()->getManifest().id()

Revision history for this message
Owen Williams (ywwg) wrote :
Changed in mixxx:
assignee: nobody → Owen Williams (ywwg)
status: Confirmed → In Progress
Owen Williams (ywwg)
Changed in mixxx:
status: In Progress → Fix Committed
RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/7781

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.