Just want to chip in here and let users know of a potential alternative that I use that is (somewhat) linked to Foobar2000...
If like me, you simply can't get your head around Foobar2000 and want a method slightly simpler, try dbPoweramp's Batch Converter with the ReplayGain Plugin/'encoder'. The [ReplayGain] 'encoder' does not alter the audio data in any way, it simply adds the relevent tags to the ID3 tags of your music files, and that's it. It supports Album Gain, Track Gain, Album/Track Peak and ItunesNORM tags. Combinations of all of these are selectable and it also suppports the 'EBU-R128' method algorithm that is supposed to be superior even to the ReplayGain standard while still writing the calculated values using standards-compliant 'ReplayGain' ID3 tags. It will also work on ID3v2.3 and ID3v2.4 tags without issue.
The only caveat(s) with dbPoweramp is it's not free. The other being that it uses a 2-pass approach. 1st pass to calulate the values, and second pass to actually write them to the source files. However the UI has no progress indication for the second pass, so it can appear as if the converter has 'hung' when processing large amounts of files at the same time. Reason being the 1st pass is run on all selected files, then the 2nd pass is run on the whole file list again. Progress (and the ability to cancel/back-out) is only available for the duration of the 1st pass, so once it's visually 'complete', it proceeds to write out the calculated values on a per-album basis to all the tracks selected. This can induce a considerable delay. Best to run this one overnight if processing a whole library at once. It also tends to baulk on files with even the simplest of errors, so I generally run my files through MP3Diags first (for MP3 files only).
My collection consists solely of FLACS and MP3s as I found out (to my own cost), that M4A's are not nearly as resilient to corruption as I initially thought they would be, especially when using Rsync-type tools to move them about on my network, and the tools simply do not exist to recover M4A's that exist for MP3s. YMMV.
For those who use MusicBrainz Picard to tag their collections, your going to want to do any ReplayGain adjustments AFTER tagging, as by default MB-Picard will strip any tags that it doesn't recognize unless those are added to it's list of exclusions. That is true for ReplayGain tags and also ITunesNORM tags (if added/selected).
On a side note; MP3Gain does not generate ReplayGain tags or calulate gain in the sense that we are trying to do here. It actually NORMALISES the source audio data then adds seperate non-standards-compliant OGG Vorbis comments (EDIT: It may actually be APE tags, it's been a while since I used MP3Gain, so I don't rightly remember) to the end of the file with 'undo' information, so that in theory the changes can be reversed if desired. The effectiveness of such a reversal is debatable at best, not to mention the fact that many tagging tools (MusicBrainz included) also strip / remove non-standards-compliant Vorbis tags from MP3 files by default. This would then leave you with uncorrectable modified files. MP3Gain is somewhat outdated these days as it was developed primarily to cater to those who had legacy 3rd-party devices that did not natively support the ReplayGain standard / tags. I think in this day and age that's going to be a very small niche group of people.
Another (Free) alternative is Winamp. Winamp is able to calculate ReplayGain track and Album gain tags. I can't remember offhand whether it also writes 'peak' values, but it definately does write the other two. The only issue here is I think Winamp will only work on files currently located in the active playlist, and it's not automatic as far as I can remember, so using it might be somewhat tedious on a large library, but it will work.
Gib.