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