summaryrefslogtreecommitdiffstats
path: root/apps/menus
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
parent62e06cc2a432bb9499646f089796157135829195 (diff)
downloadrockbox-82f4c60db4f16642c1ee9f461d7eb060c11a49d8.tar.gz
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')
-rw-r--r--apps/menus/display_menu.c27
-rw-r--r--apps/menus/recording_menu.c23
2 files changed, 27 insertions, 23 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 */
diff --git a/apps/menus/recording_menu.c b/apps/menus/recording_menu.c
index 8eaeab699c..ae237b1b4a 100644
--- a/apps/menus/recording_menu.c
+++ b/apps/menus/recording_menu.c
@@ -392,26 +392,6 @@ MENUITEM_FUNCTION(agc_cliptime, 0, ID2P(LANG_RECORDING_AGC_CLIPTIME),
agc_cliptime_func, NULL, NULL, Icon_Menu_setting);
#endif /* HAVE_AGC */
-#if defined(HAVE_RECORDING_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) }
- };
- return set_option(str(LANG_RECORDING_HISTOGRAM_INTERVAL),
- &global_settings.rec_histogram_interval,
- INT, names, 4, NULL );
-}
-
-MENUITEM_FUNCTION(recording_histogram, 0,
- ID2P(LANG_RECORDING_HISTOGRAM_INTERVAL),
- history_interval, NULL, NULL, Icon_Menu_setting);
-
-#endif
-
/** Rec trigger **/
enum trigger_menu_option
{
@@ -666,9 +646,6 @@ MAKE_MENU(recording_settings_menu, ID2P(LANG_RECORDING_SETTINGS),
#ifdef HAVE_AGC
&agc_preset, &agc_cliptime,
#endif
-#if defined(HAVE_RECORDING_HISTOGRAM)
- &recording_histogram,
-#endif
#ifdef HAVE_LCD_BITMAP
&peak_meter_menu,
#endif