summaryrefslogtreecommitdiffstats
path: root/apps/gui/skin_engine/skin_tokens.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/skin_engine/skin_tokens.c')
-rw-r--r--apps/gui/skin_engine/skin_tokens.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c
index 217835a1e2..c644d5b3aa 100644
--- a/apps/gui/skin_engine/skin_tokens.c
+++ b/apps/gui/skin_engine/skin_tokens.c
@@ -59,6 +59,7 @@
#include "skin_engine.h"
#include "statusbar-skinned.h"
#include "root_menu.h"
+#include "peakmeter.h"
#ifdef HAVE_RECORDING
#include "recording.h"
#include "pcm_record.h"
@@ -1267,6 +1268,23 @@ const char *get_token_value(struct gui_wps *gwps,
#endif
+#ifdef HAVE_LCD_BITMAP
+ /* peakmeter */
+ case SKIN_TOKEN_PEAKMETER_LEFT:
+ case SKIN_TOKEN_PEAKMETER_RIGHT:
+ {
+ int left, right, val;
+ peak_meter_current_vals(&left, &right);
+ val = token->type == SKIN_TOKEN_PEAKMETER_LEFT ?
+ left : right;
+ val = peak_meter_scale_value(val, limit==1 ? MAX_PEAK : limit);
+ if (intval)
+ *intval = val;
+ snprintf(buf, buf_size, "%d", val);
+ data->peak_meter_enabled = true;
+ return buf;
+ }
+#endif
#if (CONFIG_CODEC == SWCODEC)
case SKIN_TOKEN_CROSSFADE: