FS#8251 - Replay Gain problem with MPC files

Attached to Project: Rockbox
Opened by Naoki (naokoon) - Thursday, 29 November 2007, 18:08 GMT
Last edited by Thom Johansen (preglow) - Friday, 30 November 2007, 01:11 GMT
Task Type Bugs
Category Music playback
Status Closed
Assigned To No-one
Operating System iPod 5G
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


I've noticed that replay gain is not applied to musepack files (SV7) that have only track gain set (and no album gain) when the replay gain type in rockbox's playback settings is set to "album gain". According to the documentation, it should automatically pick track gain whenever there is no album gain tag. This is what actually happens for MP3, OGG, and M4A files. It just doesn't work for musepack files. Replay gain is applied correctly, though, when replay gain type is set to "track gain".

I tested this on several MPC files that have track gain values < -10dB by switching between the two replay gain modes, and it was pretty obvious that replay gain wasn't applied in "track gain" mode.

I used foobar2000 for calculating replay gain.
This task depends upon

Closed by  Thom Johansen (preglow)
Friday, 30 November 2007, 01:11 GMT
Reason for closing:  Fixed
Additional comments about closing:  Just commited a fix, also fixed some other potentially buggy stuff with MPC replaygain.
Comment by Thom Johansen (preglow) - Friday, 30 November 2007, 00:24 GMT
For MPC, Replaygain info is stored in the MPC header itself, and both album gain and track gain are always present. If you only scan track gain, album gain will be set to 0. How can the MPC loader differentiate between a proper 0 dB album gain and a non-scanned album gain? If I just set "0 dB means disabled", that'll break those few rare albums that have a 0 dB album gain. I don't know how other players handle this, so please enlighten me if you know.
Comment by Thom Johansen (preglow) - Friday, 30 November 2007, 00:32 GMT
Disregard that, peak value seems to be set to 0 if scan isn't done.