diff options
author | Martin Scarratt <mmmm@rockbox.org> | 2006-08-02 17:35:41 +0000 |
---|---|---|
committer | Martin Scarratt <mmmm@rockbox.org> | 2006-08-02 17:35:41 +0000 |
commit | d68ae6a7a62e0a32cfc84200092985910c0fd099 (patch) | |
tree | 0702b9fe3e5d548fe61d5d19ac5dc4ec8e27018f /apps/gui | |
parent | 844e9b6e4c00ed8e21b944e9a5391f12e7b328ee (diff) |
WPS tags: Crossfade %?xf<off|shuffle|skip|always>, Replay gain %?rg<off|track|album|shuffle>, Crossfeed %xd<off|on>. Bits and bobs from patches 2740, 2684 and 2680 by Myself, Stephan Wezel and Robert Kukla.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10414 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui')
-rw-r--r-- | apps/gui/gwps-common.c | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index 9baf83afd9..a08298172a 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c @@ -7,7 +7,7 @@ * \/ \/ \/ \/ \/ * $Id$ * - * Copyright (C) 2002 Björn Stenberg + * Copyright (C) 2002 Bj�n Stenberg * * All files in this archive are subject to the GNU General Public License. * See the file COPYING in the source tree root for full license agreement. @@ -918,7 +918,7 @@ static char* get_tag(struct wps_data* wps_data, return buf; } break; - case 'r': /* Runtime database Information */ + case 'r': /* Runtime database Information and Replaygain */ switch(tag[1]) { case 'p': /* Playcount */ @@ -930,6 +930,16 @@ static char* get_tag(struct wps_data* wps_data, *intval = cid3->rating+1; snprintf(buf, buf_size, "%d", cid3->rating); return buf; +#if CONFIG_CODEC == SWCODEC + case 'g': /* ReplayGain */ + *flags |= WPS_REFRESH_STATIC; + if(global_settings.replaygain) + *intval = global_settings.replaygain_type+2; + else + *intval = 1; + snprintf(buf, buf_size, "%d", *intval); + return buf; +#endif } break; #ifdef CONFIG_RTC @@ -1070,6 +1080,21 @@ static char* get_tag(struct wps_data* wps_data, return buf; } #endif /* CONFIG_RTC */ +#if CONFIG_CODEC == SWCODEC + case 'x': + *flags |= WPS_REFRESH_DYNAMIC; + switch(tag[1]) + { + case 'd': /* crossfeed */ + if(global_settings.crossfeed) + return "d"; + case 'f': /* crossfade */ + *intval = global_settings.crossfade+1; + snprintf(buf, buf_size, "%d", global_settings.crossfade); + return buf; + } + break; +#endif } return NULL; } |