summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Pennequin <nicolas.pennequin@free.fr>2007-04-04 15:47:51 +0000
committerNicolas Pennequin <nicolas.pennequin@free.fr>2007-04-04 15:47:51 +0000
commit830a3a4720331ea3153f01b504222da3dd1f436a (patch)
treef9aaaafd3f3afb7d4f5474e2235ad6db39495d66
parentab90d58801e95d01dc286a8919c7d5823d81ec41 (diff)
downloadrockbox-830a3a4720331ea3153f01b504222da3dd1f436a.tar.gz
rockbox-830a3a4720331ea3153f01b504222da3dd1f436a.zip
* Make some private variables 'static'.
* Fix the pitch tag and allow it to be used on all targets except the Archos Player. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13020 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/gui/gwps-common.c8
-rw-r--r--apps/gui/gwps.h4
-rw-r--r--apps/gui/wps_parser.c16
3 files changed, 17 insertions, 11 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c
index 2bd2e4c617..ffb7ed60d5 100644
--- a/apps/gui/gwps-common.c
+++ b/apps/gui/gwps-common.c
@@ -1284,12 +1284,16 @@ static char *get_tag(struct gui_wps *gwps,
}
return buf;
}
+#endif
+#if (CONFIG_CODEC != MAS3507D)
case WPS_TOKEN_SOUND_PITCH:
+ {
+ int val = sound_get_pitch();
snprintf(buf, buf_size, "%d.%d",
- *intval / 10, *intval % 10);
+ val / 10, val % 10);
return buf;
-
+ }
#endif
#ifdef HAS_BUTTON_HOLD
diff --git a/apps/gui/gwps.h b/apps/gui/gwps.h
index c18fc0c4e3..02a83085b9 100644
--- a/apps/gui/gwps.h
+++ b/apps/gui/gwps.h
@@ -122,9 +122,11 @@ enum wps_token_type {
WPS_TOKEN_BATTERY_CHARGING,
WPS_TOKEN_BATTERY_SLEEPTIME,
-#if (CONFIG_CODEC == SWCODEC)
/* Sound */
+#if (CONFIG_CODEC != MAS3507D)
WPS_TOKEN_SOUND_PITCH,
+#endif
+#if (CONFIG_CODEC == SWCODEC)
WPS_TOKEN_REPLAYGAIN,
#endif
diff --git a/apps/gui/wps_parser.c b/apps/gui/wps_parser.c
index ef9d446444..07a1df64ac 100644
--- a/apps/gui/wps_parser.c
+++ b/apps/gui/wps_parser.c
@@ -40,24 +40,24 @@
/* level of current conditional.
-1 means we're not in a conditional. */
-int level = -1;
+static int level = -1;
/* index of the last WPS_TOKEN_CONDITIONAL_OPTION
or WPS_TOKEN_CONDITIONAL_START in current level */
-int lastcond[WPS_MAX_COND_LEVEL];
+static int lastcond[WPS_MAX_COND_LEVEL];
/* index of the WPS_TOKEN_CONDITIONAL in current level */
-int condindex[WPS_MAX_COND_LEVEL];
+static int condindex[WPS_MAX_COND_LEVEL];
/* number of condtional options in current level */
-int numoptions[WPS_MAX_COND_LEVEL];
+static int numoptions[WPS_MAX_COND_LEVEL];
#ifdef HAVE_LCD_BITMAP
/* pointers to the bitmap filenames in the WPS source */
-const char *bmp_names[MAX_IMAGES];
-const char *pb_bmp_name;
+static const char *bmp_names[MAX_IMAGES];
+static const char *pb_bmp_name;
#if LCD_DEPTH > 1
-const char *backdrop_bmp_name;
+static const char *backdrop_bmp_name;
#endif
#endif
@@ -185,7 +185,7 @@ static const struct wps_tag all_tags[] = {
{ "Iy", WPS_TOKEN_METADATA_YEAR, WPS_REFRESH_DYNAMIC, NULL },
{ "IC", WPS_TOKEN_METADATA_COMMENT, WPS_REFRESH_DYNAMIC, NULL },
-#if (CONFIG_CODEC == SWCODEC)
+#if (CONFIG_CODEC != MAS3507D)
{ "Sp", WPS_TOKEN_SOUND_PITCH, WPS_REFRESH_DYNAMIC, NULL },
#endif