I’m not sure that adjusting the waveform on the transcode side is the “right” thing to do. Surely it should be the player that should read the dmap tags and decide to apply replaygain. I’m *sure* iTunes would do it that way.
Maybe the thing to do would be to implement something and see how it works empirically. 🙂