- All values are stored big-endian (most significant byte first). This tripped me up, because this is not true for all data stored in all tag formats.
- If we think of the peak value in terms of the “units, tens, thousands” format you learned at school (only, of course, in binary this is “units, twos, fours”), the first bit is the units, the second is the halves, the third quarters and so on. Simple, yes? However, it’s not so easy to infer from the code that parses it. So I’ve put plenty of comments in the amarokcollectionscanner code.
- Everything else you could wish to know about the format is in the ID3v2.4 frames list, section 4.11.
So Amarok’s collection now has complete support for replay gain tags in Ogg Vorbis (as written by vorbisgain), FLAC (as written by flacenc) and MP3 (as written by Foobar2000 [ID3v2.3 TXXX comments], Quod Libet / Mutagen [ID3v2.4 RVA2] or mp3gain [APEv2]).
Other formats will follow. As will replay gain support for files that aren’t in the collection, but are on the local machine.