How to ramp volume?

Trying to ramp the volume of the oscillator to avoid clicking, but what seemed like an easy implementation isnt working and not sure how to go about this

what was tried (the change here is way to small and the clicking is still there

for (short i = 0; i < 100; i++) {
    vcoData.volume += increment * 0.00001f;
    vco.SetAmp(vcoData.volume);
}

thinking that maybe using .IsEOC() would be best, but unsure about how to implement this

I’d use an envelope.
https://electro-smith.github.io/DaisySP/classdaisysp_1_1_ad_env.html