To summarize, an echo effect is basically a positive feedback effect that is implemented with a delay line zD which delays the input signal by D samples. My effects works fine. I get the echo effect.
My issue is I gave the user to adjust D sample amount during runtime just like in Pioneer equiments you can set echo as 4beats, 2beats, 1beats etc. When a user request a beat duration change I immediatly change the D parameter in my audio plugin. The problem is sometimes this causes click due to sudden audio level changes. I am trying to find a way to counter this but so far I can not think of anyways to do it. How may I ensure that the audio level is continous(doesnt spike and result in audio clicks) when user changes the parameter D?