This could be done with no additional buffers. 

You're taking a buffer of ```oldGain * input[i]``` and ```newGain * input[i]``` and linearly interpolating them.

The result is: ```output[i] = (1-inc) * oldGain * input[i] + inc * newGain * input[i]```

Which is just:   ```output[i] = ((1-inc) * oldGain + inc * newGain) * input[i]```.

Can you instead make a SampleUtil::applyRampingGain method that just changes the gain factor as it steps from oldGain to newGain? It would avoid the extra overhead of multiple buffers.