I use (and love) QuodLibet as a my music player and it has a plugin that calculates replay gain values (album and track) and stores them in the files.
However, it doesn't work for my m4a files...just my mp3 and flac.
Any suggestions for a tool that will do this on Ubuntu 12.04+