diff options
Diffstat (limited to 'apps/sound_menu.c')
-rw-r--r-- | apps/sound_menu.c | 41 |
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 | ||
520 | static 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 | |||
540 | static 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 | ||
521 | static bool chanconf(void) | 556 | static 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); |