Fix crackling noise when switching quick effects #15796
Conversation
…ctSpecificState>>
…s single source of truth for enabling and disabling.
acolombier
left a comment
There was a problem hiding this comment.
Code looks good - is there an easy way to test this by hear?
Also, did you mean to target 2.5?
|
Yes the issue happens already in 2.5. You can hear the click by ear if you play a 440 Hz Sine wave. |
|
This dip happens due to the group delay of the filter and crossfading. If you cross fade a delayed signal with the original and the delay is exactly at 180° the dip will go to zero at 50 % crossfade. For real audio, this zeros out one frequency and it's harmonic. like a phaser effect. I think DAW station allow to compensate the group delay. Mixxx does not have the feature for the sake of a minimal latency. |
|
Ah okay, thanks for the xplanation. So the dip is so obvious because we fade two sine waves with the same frequency. |
|
Yes. |
|
Approved by Antoine, so let's merge. |


This fixes #15794
The issue was that the enabling state was maintained only one time. In the first channel that was processed after the change.
The quick effects are however instantiated for all channels and only one is used. This leads to loss of the enabling disabling states. Now the state is maintained for each instants together with the same sates for the invisible routing switches in m_channelStateMatrix. This even simplifies the code
before:

after:
