You still need to copy pIn to pOutput, using SampleUtil::copyWithGain -- if the two pointers are the same, copyWithGain will do the right thing and not waste any cycles.