Great! Are you using ID3's RVA2 tag or Lame's built-in RG data? I believe the common way is to first try to read RVA2 tags and revert to Lame's as a fallback when the RVA2 tag is not available.sbooth wrote:I've just posted r722 which changes a few things:
I've added preliminary replay gain support. It is preliminary because while the gains are read from files and implemented in the player, they are not settable. At some point in the future they will be but I just wanted to add the fields to the database now.
I'm not sure what you mean by 'setting' though? Users are not supposed to set the values themselves. They are (by the standard) all relative to the same dB level. The values in the files should be detected by an algorithm (like this one for instance) and if final playback is too loud or to soft then the amount of applied pre-amp (which is a player wide setting and not an individual file setting) has to be changed.
A lot of users actually don't understand the workings of RG and would like to edit the files by hand themselves if they think they are too soft or too loud. But, messing with the RG values in the files usually messes playback up big-time. Think distortion and clipping. Furthermore, playing these same files in other players with different decoders and pre-amp settings will screw it up again.
Winamp has done this very nice. The RG values are non-editable metadata in the UI's 'info' field. They have a built-in scan mechanism to scan files for the right value and they have a slider to set the amount of pre-amp. This way users only have influence on things they should have and can't mess up.
As an extra, you may want to consider using possible present iTunes normalisation ("Sound Check") data. Especially on OS X a lot of users might already have this info in their files. It's just there for the taking.
