Rockbox

Tasklist

FS#11964 - Rework replaygain metadata handling

Attached to Project: Rockbox
Opened by Andree Buschmann (Buschel) - Thursday, 24 February 2011, 06:39 GMT
Last edited by Andree Buschmann (Buschel) - Thursday, 24 February 2011, 19:11 GMT
Task Type Patches
Category ID3 / meta data
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Release 3.7.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

This patch reworks the handling of the replaygain metadata. The goal is to save space in id3v2buf and to save some binsize. The svn implementation uses two independent representations for gain values: (1) an integer value which can directly be used by our dsp-code and (2) a string representation. The string representation is only used by WPS/screen for display purposes. To keep the string representation id3v2buf is used (9 bytes per gain).

Main idea of this patch is to fully remove the string representation and perform a snprintf() based on the integer representation when needing it for WPS/screen purposes.

In consequence the integer representation cannot be saved in a ready-to-use format for the dsp-code. When handing over the gain to the dsp-code convert_gain() must be called. Through dropping the string handling the replaygain related code became smaller (~300 bytes for a nano 2g).

As a bonus a svn bug is fixed that displayed wrong replaygains when parse_replaygain_int() was used to set the gains (used by mpc and ID3v2.4 tags).
This task depends upon

Closed by  Andree Buschmann (Buschel)
Thursday, 24 February 2011, 19:11 GMT
Reason for closing:  Accepted
Additional comments about closing:  Submitted with r29388.
Comment by Andree Buschmann (Buschel) - Thursday, 24 February 2011, 18:55 GMT
Do not display replaygain in info screen, if replaygain is 0 dB

Loading...