summaryrefslogtreecommitdiffstats
path: root/apps/menus/display_menu.c
diff options
context:
space:
mode:
authorPeter D'Hoye <peter.dhoye@gmail.com>2011-06-05 12:36:27 +0000
committerPeter D'Hoye <peter.dhoye@gmail.com>2011-06-05 12:36:27 +0000
commit82f4c60db4f16642c1ee9f461d7eb060c11a49d8 (patch)
treea7a75d4e57941ebd1b5b15b051a28d1d4751964e /apps/menus/display_menu.c
parent62e06cc2a432bb9499646f089796157135829195 (diff)
downloadrockbox-82f4c60db4f16642c1ee9f461d7eb060c11a49d8.tar.gz
rockbox-82f4c60db4f16642c1ee9f461d7eb060c11a49d8.tar.bz2
rockbox-82f4c60db4f16642c1ee9f461d7eb060c11a49d8.zip
Make the histogram code usable for playback as well. Move the recording histogram code to peakmeter, rename it to remove the recording reference, and rename anything referring to it as well. Change the drawing code so there are more options to position them. This may change your histogram settings, so check after upgrading.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29969 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menus/display_menu.c')
-rw-r--r--apps/menus/display_menu.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/apps/menus/display_menu.c b/apps/menus/display_menu.c
index 4badf960ba..7e7b5a6903 100644
--- a/apps/menus/display_menu.c
+++ b/apps/menus/display_menu.c
@@ -443,6 +443,30 @@ static int peak_meter_max(void) {
settings_apply_pm_range();
return retval;
}
+
+#if defined(HAVE_HISTOGRAM)
+static bool history_interval(void)
+{
+ static const struct opt_items names[] = {
+ { "0s", TALK_ID(0, UNIT_SEC) },
+ { "1s", TALK_ID(1, UNIT_SEC) },
+ { "2s", TALK_ID(2, UNIT_SEC) },
+ { "4s", TALK_ID(4, UNIT_SEC) }
+ };
+
+ /* reconfigure histogram settings here */
+
+ return set_option(str(LANG_HISTOGRAM_INTERVAL),
+ &global_settings.histogram_interval,
+ INT, names, 4, NULL );
+}
+
+MENUITEM_FUNCTION(histogram, 0,
+ ID2P(LANG_HISTOGRAM_INTERVAL),
+ history_interval, NULL, NULL, Icon_Menu_setting);
+
+#endif
+
MENUITEM_FUNCTION(peak_meter_scale_item, 0, ID2P(LANG_PM_SCALE),
peak_meter_scale, NULL, NULL, Icon_NOICON);
MENUITEM_FUNCTION(peak_meter_min_item, 0, ID2P(LANG_PM_MIN),
@@ -455,6 +479,9 @@ MAKE_MENU(peak_meter_menu, ID2P(LANG_PM_MENU), NULL, Icon_NOICON,
#ifdef HAVE_RECORDING
&peak_meter_clipcounter,
#endif
+#ifdef HAVE_HISTOGRAM
+ &histogram,
+#endif
&peak_meter_scale_item, &peak_meter_min_item, &peak_meter_max_item);
#endif /* HAVE_LCD_BITMAP */
/* PEAK METER MENU */