mp3gain is at the frame level. Sonos in particular does not honor ReplayGain. So the workflow is to adjust the volume with mp3gain, then re-analyze those levels and set the ReplayGain. That way it plays on devices that don't honor Replay Gain. Sonos sucks for local mp3s - it's the only way to get the volume to come out the same for everything.
> So the workflow is to adjust the volume with mp3gain, then re-analyze those levels and set the ReplayGain
Doesn't that already happen automatically when you bake the adjustment into the file using mp3gain?
Also small sidenote: There's also a modded version of mp3gain that supports AAC files, too, including the same workflow of optionally baking the adjustments into the AAC data itself for ReplayGain unaware-software. (https://github.com/dgilman/aacgain)