Are you sure this is working right?
sf_advancecomp(&STX[i], 48000, 0, -40, 0, 10, 0.25f, 0.15f,
					0.006f, // predelay
					0.090f, // releasezone1
					0.160f, // releasezone2
					0.420f, // releasezone3
					0.980f, // releasezone4
					0.000f, // postgain
					1.000f  // wet
				);
 
Now this is fed with a 512-sample array

And the result is (at sample 287)

Is there some extra gain added?