summaryrefslogtreecommitdiff
path: root/apps/gui
diff options
context:
space:
mode:
authorMartin Scarratt <mmmm@rockbox.org>2006-08-02 17:35:41 +0000
committerMartin Scarratt <mmmm@rockbox.org>2006-08-02 17:35:41 +0000
commitd68ae6a7a62e0a32cfc84200092985910c0fd099 (patch)
tree0702b9fe3e5d548fe61d5d19ac5dc4ec8e27018f /apps/gui
parent844e9b6e4c00ed8e21b944e9a5391f12e7b328ee (diff)
downloadrockbox-d68ae6a7a62e0a32cfc84200092985910c0fd099.tar.gz
rockbox-d68ae6a7a62e0a32cfc84200092985910c0fd099.zip
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.c29
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 @@
7 * \/ \/ \/ \/ \/ 7 * \/ \/ \/ \/ \/
8 * $Id$ 8 * $Id$
9 * 9 *
10 * Copyright (C) 2002 Björn Stenberg 10 * Copyright (C) 2002 Bj�n Stenberg
11 * 11 *
12 * All files in this archive are subject to the GNU General Public License. 12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement. 13 * 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,
918 return buf; 918 return buf;
919 } 919 }
920 break; 920 break;
921 case 'r': /* Runtime database Information */ 921 case 'r': /* Runtime database Information and Replaygain */
922 switch(tag[1]) 922 switch(tag[1])
923 { 923 {
924 case 'p': /* Playcount */ 924 case 'p': /* Playcount */
@@ -930,6 +930,16 @@ static char* get_tag(struct wps_data* wps_data,
930 *intval = cid3->rating+1; 930 *intval = cid3->rating+1;
931 snprintf(buf, buf_size, "%d", cid3->rating); 931 snprintf(buf, buf_size, "%d", cid3->rating);
932 return buf; 932 return buf;
933#if CONFIG_CODEC == SWCODEC
934 case 'g': /* ReplayGain */
935 *flags |= WPS_REFRESH_STATIC;
936 if(global_settings.replaygain)
937 *intval = global_settings.replaygain_type+2;
938 else
939 *intval = 1;
940 snprintf(buf, buf_size, "%d", *intval);
941 return buf;
942#endif
933 } 943 }
934 break; 944 break;
935#ifdef CONFIG_RTC 945#ifdef CONFIG_RTC
@@ -1070,6 +1080,21 @@ static char* get_tag(struct wps_data* wps_data,
1070 return buf; 1080 return buf;
1071 } 1081 }
1072#endif /* CONFIG_RTC */ 1082#endif /* CONFIG_RTC */
1083#if CONFIG_CODEC == SWCODEC
1084 case 'x':
1085 *flags |= WPS_REFRESH_DYNAMIC;
1086 switch(tag[1])
1087 {
1088 case 'd': /* crossfeed */
1089 if(global_settings.crossfeed)
1090 return "d";
1091 case 'f': /* crossfade */
1092 *intval = global_settings.crossfade+1;
1093 snprintf(buf, buf_size, "%d", global_settings.crossfade);
1094 return buf;
1095 }
1096 break;
1097#endif
1073 } 1098 }
1074 return NULL; 1099 return NULL;
1075} 1100}