diff options
Diffstat (limited to 'apps/gui/gwps-common.c')
-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 @@ | |||
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 | } |