diff options
author | Peter D'Hoye <peter.dhoye@gmail.com> | 2011-06-05 12:36:27 +0000 |
---|---|---|
committer | Peter D'Hoye <peter.dhoye@gmail.com> | 2011-06-05 12:36:27 +0000 |
commit | 82f4c60db4f16642c1ee9f461d7eb060c11a49d8 (patch) | |
tree | a7a75d4e57941ebd1b5b15b051a28d1d4751964e /apps/menus/display_menu.c | |
parent | 62e06cc2a432bb9499646f089796157135829195 (diff) | |
download | rockbox-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/display_menu.c')
-rw-r--r-- | apps/menus/display_menu.c | 27 |
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) { | |||
443 | settings_apply_pm_range(); | 443 | settings_apply_pm_range(); |
444 | return retval; | 444 | return retval; |
445 | } | 445 | } |
446 | |||
447 | #if defined(HAVE_HISTOGRAM) | ||
448 | static bool history_interval(void) | ||
449 | { | ||
450 | static const struct opt_items names[] = { | ||
451 | { "0s", TALK_ID(0, UNIT_SEC) }, | ||
452 | { "1s", TALK_ID(1, UNIT_SEC) }, | ||
453 | { "2s", TALK_ID(2, UNIT_SEC) }, | ||
454 | { "4s", TALK_ID(4, UNIT_SEC) } | ||
455 | }; | ||
456 | |||
457 | /* reconfigure histogram settings here */ | ||
458 | |||
459 | return set_option(str(LANG_HISTOGRAM_INTERVAL), | ||
460 | &global_settings.histogram_interval, | ||
461 | INT, names, 4, NULL ); | ||
462 | } | ||
463 | |||
464 | MENUITEM_FUNCTION(histogram, 0, | ||
465 | ID2P(LANG_HISTOGRAM_INTERVAL), | ||
466 | history_interval, NULL, NULL, Icon_Menu_setting); | ||
467 | |||
468 | #endif | ||
469 | |||
446 | MENUITEM_FUNCTION(peak_meter_scale_item, 0, ID2P(LANG_PM_SCALE), | 470 | MENUITEM_FUNCTION(peak_meter_scale_item, 0, ID2P(LANG_PM_SCALE), |
447 | peak_meter_scale, NULL, NULL, Icon_NOICON); | 471 | peak_meter_scale, NULL, NULL, Icon_NOICON); |
448 | MENUITEM_FUNCTION(peak_meter_min_item, 0, ID2P(LANG_PM_MIN), | 472 | 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, | |||
455 | #ifdef HAVE_RECORDING | 479 | #ifdef HAVE_RECORDING |
456 | &peak_meter_clipcounter, | 480 | &peak_meter_clipcounter, |
457 | #endif | 481 | #endif |
482 | #ifdef HAVE_HISTOGRAM | ||
483 | &histogram, | ||
484 | #endif | ||
458 | &peak_meter_scale_item, &peak_meter_min_item, &peak_meter_max_item); | 485 | &peak_meter_scale_item, &peak_meter_min_item, &peak_meter_max_item); |
459 | #endif /* HAVE_LCD_BITMAP */ | 486 | #endif /* HAVE_LCD_BITMAP */ |
460 | /* PEAK METER MENU */ | 487 | /* PEAK METER MENU */ |