If I’m understanding the situation correctly the toggle needs to be synced so that its result happens at the beginning of a window. Whereas the current patch is likely to misalign the phases by changing to and from the frozen data potentially in the middle of a frame.
Using sah~ hasn’t helped though.
I don’t have a problem using the exact input phases when the freezing is bypassed, however there is a discontinuity when switching to the frozen signal that I haven’t been able to get rid of.
If I can get rid of this then the problem for my application is solved. The discontinuity going from the frozen signal back to the unchanged signal is irrelevant though.
Attached is one attempt at a solution albeit with a discontinuity when switching to the frozen signal.