One other thing. foobar2000 is capable of modifying the mp3 headers just as mp3gain does. However, there is no undo after you apply the gain changes. foobar2000 then modifies the RG tags to reflect the difference.
As someone mentioned earlier mp3gain is agonizingly slow. foobar2000 appears to be able to take advantage of multi-core CPUs during its scan process. I’ve incorporated some Powershell scripts I created to apply the RG values created by foobar2000 to the tags that mp3gain uses. The scripts then call mp3gain to apply the changes and subsequently updates the foobar2000 RG tags. Whew!
FYI: The latest available version of mp3gain (1.5.1) has an option to use id3 tags instead of APE. It doesn’t use TXXX frames though. It uses RVA2 (Relative Volume Adjustment) frames. In truth this is probably the truly “correct” way of implementing volume adjustment.
I’ll shut up for now.