summaryrefslogtreecommitdiff
path: root/apps/sound_menu.c
diff options
context:
space:
mode:
authorPeter D'Hoye <peter.dhoye@gmail.com>2006-08-16 23:26:55 +0000
committerPeter D'Hoye <peter.dhoye@gmail.com>2006-08-16 23:26:55 +0000
commit5fc66e58dd8a62099cfb1c3f7ae48d7115376be3 (patch)
tree0dc6123bb179a5eba4953d62155a4b48dea75869 /apps/sound_menu.c
parentc5a24c69221dbd8f2c55f007d9d7eaa2222fa5df (diff)
downloadrockbox-5fc66e58dd8a62099cfb1c3f7ae48d7115376be3.tar.gz
rockbox-5fc66e58dd8a62099cfb1c3f7ae48d7115376be3.zip
Automatic Gain Control during recording. At this point only compiled for iriver h1x0 and h3x0. Patch FS#4748 by Jvo Studer, Martin Scarratt and myself.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10625 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/sound_menu.c')
-rw-r--r--apps/sound_menu.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/apps/sound_menu.c b/apps/sound_menu.c
index 280fe52169..34ed9af000 100644
--- a/apps/sound_menu.c
+++ b/apps/sound_menu.c
@@ -516,6 +516,41 @@ static bool cliplight(void)
516} 516}
517#endif /*CONFIG_BACKLIGHT */ 517#endif /*CONFIG_BACKLIGHT */
518 518
519#ifdef HAVE_AGC
520static bool agc_preset(void)
521{
522 static const struct opt_items names[] = {
523 { STR(LANG_OFF) },
524 { STR(LANG_AGC_SAFETY) },
525 { STR(LANG_AGC_LIVE) },
526 { STR(LANG_AGC_DJSET) },
527 { STR(LANG_AGC_MEDIUM) },
528 { STR(LANG_AGC_VOICE) },
529 };
530 if (global_settings.rec_source)
531 return set_option(str(LANG_RECORD_AGC_PRESET),
532 &global_settings.rec_agc_preset_line,
533 INT, names, 6, NULL );
534 else
535 return set_option(str(LANG_RECORD_AGC_PRESET),
536 &global_settings.rec_agc_preset_mic,
537 INT, names, 6, NULL );
538}
539
540static bool agc_cliptime(void)
541{
542 static const struct opt_items names[] = {
543 { "200ms", TALK_ID(200, UNIT_MS) },
544 { "400ms", TALK_ID(400, UNIT_MS) },
545 { "600ms", TALK_ID(600, UNIT_MS) },
546 { "800ms", TALK_ID(800, UNIT_MS) },
547 { "1s", TALK_ID(1, UNIT_SEC) }
548 };
549 return set_option(str(LANG_RECORD_AGC_CLIPTIME),
550 &global_settings.rec_agc_cliptime,
551 INT, names, 5, NULL );
552}
553#endif /* HAVE_AGC */
519#endif /* HAVE_RECORDING */ 554#endif /* HAVE_RECORDING */
520 555
521static bool chanconf(void) 556static bool chanconf(void)
@@ -1015,6 +1050,12 @@ bool recording_menu(bool no_source)
1015 items[i].desc = ID2P(LANG_RECORD_TRIGGER); 1050 items[i].desc = ID2P(LANG_RECORD_TRIGGER);
1016 items[i++].function = rectrigger; 1051 items[i++].function = rectrigger;
1017#endif 1052#endif
1053#ifdef HAVE_AGC
1054 items[i].desc = ID2P(LANG_RECORD_AGC_PRESET);
1055 items[i++].function = agc_preset;
1056 items[i].desc = ID2P(LANG_RECORD_AGC_CLIPTIME);
1057 items[i++].function = agc_cliptime;
1058#endif
1018 1059
1019 m=menu_init( items, i, NULL, NULL, NULL, NULL); 1060 m=menu_init( items, i, NULL, NULL, NULL, NULL);
1020 result = menu_run(m); 1061 result = menu_run(m);