From 71ceac0b740398050af4f21b56acd5b31e2520f0 Mon Sep 17 00:00:00 2001 From: Andree Buschmann Date: Thu, 24 Feb 2011 19:10:59 +0000 Subject: FS#11964. Rework replaygain handling to save metadata buffer and binsize. Remove string representation of replaygain and use a dedicated ftoa implementation for WPS/screen info. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29388 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/skin_engine/skin_tokens.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'apps/gui/skin_engine/skin_tokens.c') diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c index f455999b2a..1fbe3d714e 100644 --- a/apps/gui/skin_engine/skin_tokens.c +++ b/apps/gui/skin_engine/skin_tokens.c @@ -35,6 +35,7 @@ #include "sound.h" #include "debug.h" #include "cuesheet.h" +#include "replaygain.h" #ifdef HAVE_LCD_CHARCELLS #include "hwcompat.h" #endif @@ -1305,8 +1306,8 @@ const char *get_token_value(struct gui_wps *gwps, { int type; if (LIKELY(id3)) - type = get_replaygain_mode(id3->track_gain_string != NULL, - id3->album_gain_string != NULL); + type = get_replaygain_mode(id3->track_gain != 0, + id3->album_gain != 0); else type = -1; @@ -1331,11 +1332,11 @@ const char *get_token_value(struct gui_wps *gwps, /* due to above, coming here with !id3 shouldn't be possible */ case 2: case 4: - strlcpy(buf, id3->track_gain_string, buf_size); + replaygain_itoa(buf, buf_size, id3->track_gain); break; case 3: case 5: - strlcpy(buf, id3->album_gain_string, buf_size); + replaygain_itoa(buf, buf_size, id3->album_gain); break; } return buf; -- cgit v1.2.3