Same works here:
```output[i] = (1-inc) * (input1[i] * oldGain1 + input2[i] * oldGain2 + input3[i] * oldGain3) + (inc) * (input1[i] * newGain1 + input2[i] * newGain2 + input3[i] * newGain3)```
```output[i] = ((1-inc) * oldGain1 + inc * newGain1) * input1[i] + ((1-inc) * oldGain2 + inc * newGain2) * input2[i] + ((1-inc) * oldGain3 + inc * newGain3) * input3[i]```

You could also build a SampleUtil::copy3WithRampingGain function that does this by just changing the gain factor of each input at every step.