diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/lang/english.lang | 24 | ||||
-rw-r--r-- | apps/recorder/peakmeter.c | 34 | ||||
-rw-r--r-- | apps/settings.c | 5 | ||||
-rw-r--r-- | apps/settings.h | 4 | ||||
-rw-r--r-- | apps/sound_menu.c | 28 |
5 files changed, 92 insertions, 3 deletions
diff --git a/apps/lang/english.lang b/apps/lang/english.lang index a5b3f916c1..dcb7c07cc6 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang | |||
@@ -3724,3 +3724,27 @@ desc: jump to new page when scrolling | |||
3724 | eng: "Paged Scrolling" | 3724 | eng: "Paged Scrolling" |
3725 | voice: "" | 3725 | voice: "" |
3726 | new: | 3726 | new: |
3727 | |||
3728 | id: LANG_CLIP_LIGHT | ||
3729 | desc: in record settings menu. | ||
3730 | eng: "Clipping light" | ||
3731 | voice: "Clipping light" | ||
3732 | new: | ||
3733 | |||
3734 | id: LANG_MAIN_UNIT | ||
3735 | desc: in record settings menu. | ||
3736 | eng: "Main unit only" | ||
3737 | voice: "Main unit only" | ||
3738 | new: | ||
3739 | |||
3740 | id: LANG_REMOTE_UNIT | ||
3741 | desc: in record settings menu. | ||
3742 | eng: "Remote unit only" | ||
3743 | voice: "Remote unit only" | ||
3744 | new: | ||
3745 | |||
3746 | id: LANG_REMOTE_MAIN | ||
3747 | desc: in record settings menu. | ||
3748 | eng: "Main and remote unit" | ||
3749 | voice: "Main and remote unit" | ||
3750 | new: | ||
diff --git a/apps/recorder/peakmeter.c b/apps/recorder/peakmeter.c index fbd206bdf8..0142a9d093 100644 --- a/apps/recorder/peakmeter.c +++ b/apps/recorder/peakmeter.c | |||
@@ -32,6 +32,10 @@ | |||
32 | #include "icons.h" | 32 | #include "icons.h" |
33 | #include "lang.h" | 33 | #include "lang.h" |
34 | #include "peakmeter.h" | 34 | #include "peakmeter.h" |
35 | #include "audio.h" | ||
36 | #ifdef CONFIG_BACKLIGHT | ||
37 | #include "backlight.h" | ||
38 | #endif | ||
35 | 39 | ||
36 | #if CONFIG_CODEC == SWCODEC | 40 | #if CONFIG_CODEC == SWCODEC |
37 | #include "pcm_playback.h" | 41 | #include "pcm_playback.h" |
@@ -943,9 +947,35 @@ void peak_meter_draw(int x, int y, int width, int height) | |||
943 | have been calculated before */ | 947 | have been calculated before */ |
944 | lcd_drawpixel(db_scale_lcd_coord[i], y + height / 2 - 1); | 948 | lcd_drawpixel(db_scale_lcd_coord[i], y + height / 2 - 1); |
945 | } | 949 | } |
950 | |||
951 | #ifdef HAVE_RECORDING | ||
946 | 952 | ||
953 | #ifdef CONFIG_BACKLIGHT | ||
954 | /* cliplight */ | ||
955 | if ((pm_clip_left || pm_clip_right) && | ||
956 | global_settings.cliplight && | ||
957 | #if CONFIG_CODEC == SWCODEC | ||
958 | (pcm_rec_status() & (AUDIO_STATUS_RECORD | AUDIO_STATUS_PRERECORD))) | ||
959 | #else | ||
960 | (audio_status() & (AUDIO_STATUS_RECORD | AUDIO_STATUS_PRERECORD))) | ||
961 | #endif | ||
962 | { | ||
963 | /* if clipping, cliplight setting on and in recording screen */ | ||
964 | if (global_settings.cliplight <= 2) | ||
965 | { | ||
966 | /* turn on main unit light if setting set to main or both*/ | ||
967 | backlight_on(); | ||
968 | } | ||
969 | #ifdef HAVE_REMOTE_LCD | ||
970 | if (global_settings.cliplight >= 2) | ||
971 | { | ||
972 | /* turn remote light unit on if setting set to remote or both */ | ||
973 | remote_backlight_on(); | ||
974 | } | ||
975 | #endif /* HAVE_REMOTE_LCD */ | ||
976 | } | ||
977 | #endif /*CONFIG_BACKLIGHT */ | ||
947 | 978 | ||
948 | #ifdef HAVE_RECORDING | ||
949 | if (trig_status != TRIG_OFF) { | 979 | if (trig_status != TRIG_OFF) { |
950 | int start_trigx, stop_trigx, ycenter; | 980 | int start_trigx, stop_trigx, ycenter; |
951 | 981 | ||
@@ -961,7 +991,7 @@ void peak_meter_draw(int x, int y, int width, int height) | |||
961 | lcd_vline(stop_trigx, ycenter - 2, ycenter); | 991 | lcd_vline(stop_trigx, ycenter - 2, ycenter); |
962 | if (stop_trigx > 0) lcd_drawpixel(stop_trigx - 1, ycenter - 1); | 992 | if (stop_trigx > 0) lcd_drawpixel(stop_trigx - 1, ycenter - 1); |
963 | } | 993 | } |
964 | #endif | 994 | #endif /*HAVE_RECORDING*/ |
965 | 995 | ||
966 | #ifdef PM_DEBUG | 996 | #ifdef PM_DEBUG |
967 | /* display a bar to show how many calls to peak_meter_peek | 997 | /* display a bar to show how many calls to peak_meter_peek |
diff --git a/apps/settings.c b/apps/settings.c index d776f3f2d3..1f29e4d04d 100644 --- a/apps/settings.c +++ b/apps/settings.c | |||
@@ -540,6 +540,11 @@ static const struct bit_entry hd_bits[] = | |||
540 | "mic decimator right gain", NULL }, /* -128...48 */ | 540 | "mic decimator right gain", NULL }, /* -128...48 */ |
541 | #endif | 541 | #endif |
542 | {1, S_O(scroll_paginated), false, "scroll paginated", off_on }, | 542 | {1, S_O(scroll_paginated), false, "scroll paginated", off_on }, |
543 | #ifdef HAVE_RECORDING | ||
544 | #ifdef CONFIG_BACKLIGHT | ||
545 | {2, S_O(cliplight), 0, "cliplight", "off,main,both,remote" }, | ||
546 | #endif /* CONFIG_BACKLIGHT */ | ||
547 | #endif /*HAVE_RECORDING*/ | ||
543 | /* If values are just added to the end, no need to bump the version. */ | 548 | /* If values are just added to the end, no need to bump the version. */ |
544 | /* new stuff to be added at the end */ | 549 | /* new stuff to be added at the end */ |
545 | 550 | ||
diff --git a/apps/settings.h b/apps/settings.h index 9548936349..9220f79595 100644 --- a/apps/settings.h +++ b/apps/settings.h | |||
@@ -236,6 +236,10 @@ struct user_settings | |||
236 | int rec_prerecord_time; /* In seconds, 0-30, 0 means OFF */ | 236 | int rec_prerecord_time; /* In seconds, 0-30, 0 means OFF */ |
237 | int rec_directory; /* 0=base dir, 1=current dir */ | 237 | int rec_directory; /* 0=base dir, 1=current dir */ |
238 | bool rec_startup; /* true means start Rockbox in recording screen */ | 238 | bool rec_startup; /* true means start Rockbox in recording screen */ |
239 | int cliplight; /* 0 = off | ||
240 | 1 = main lcd | ||
241 | 2 = main and remote lcd | ||
242 | 3 = remote lcd */ | ||
239 | 243 | ||
240 | int rec_start_thres; /* negative: db, positive: % range -87 .. 100 */ | 244 | int rec_start_thres; /* negative: db, positive: % range -87 .. 100 */ |
241 | int rec_start_duration; /* index of trig_durations */ | 245 | int rec_start_duration; /* index of trig_durations */ |
diff --git a/apps/sound_menu.c b/apps/sound_menu.c index e4820b3379..b248ca99a5 100644 --- a/apps/sound_menu.c +++ b/apps/sound_menu.c | |||
@@ -341,7 +341,29 @@ static bool reconstartup(void) | |||
341 | &global_settings.rec_startup); | 341 | &global_settings.rec_startup); |
342 | } | 342 | } |
343 | 343 | ||
344 | #endif /* MAS3587F */ | 344 | #ifdef CONFIG_BACKLIGHT |
345 | static bool cliplight(void) | ||
346 | { | ||
347 | static const struct opt_items names[] = { | ||
348 | { STR(LANG_OFF) }, | ||
349 | { STR(LANG_MAIN_UNIT) } | ||
350 | #ifdef HAVE_REMOTE_LCD | ||
351 | , { STR(LANG_REMOTE_MAIN) }, | ||
352 | { STR(LANG_REMOTE_UNIT) } | ||
353 | #endif | ||
354 | }; | ||
355 | |||
356 | return set_option( str(LANG_CLIP_LIGHT), | ||
357 | &global_settings.cliplight, INT, names, | ||
358 | #ifdef HAVE_REMOTE_LCD | ||
359 | 4, NULL ); | ||
360 | #else | ||
361 | 2, NULL ); | ||
362 | #endif | ||
363 | } | ||
364 | #endif /*CONFIG_BACKLIGHT */ | ||
365 | |||
366 | #endif /* HAVE_RECORDING */ | ||
345 | 367 | ||
346 | static bool chanconf(void) | 368 | static bool chanconf(void) |
347 | { | 369 | { |
@@ -808,6 +830,10 @@ bool recording_menu(bool no_source) | |||
808 | items[i++].function = recdirectory; | 830 | items[i++].function = recdirectory; |
809 | items[i].desc = ID2P(LANG_RECORD_STARTUP); | 831 | items[i].desc = ID2P(LANG_RECORD_STARTUP); |
810 | items[i++].function = reconstartup; | 832 | items[i++].function = reconstartup; |
833 | #ifdef CONFIG_BACKLIGHT | ||
834 | items[i].desc = ID2P(LANG_CLIP_LIGHT); | ||
835 | items[i++].function = cliplight; | ||
836 | #endif | ||
811 | #if !defined(SIMULATOR) && CONFIG_CODEC == MAS3587F | 837 | #if !defined(SIMULATOR) && CONFIG_CODEC == MAS3587F |
812 | items[i].desc = ID2P(LANG_RECORD_TRIGGER); | 838 | items[i].desc = ID2P(LANG_RECORD_TRIGGER); |
813 | items[i++].function = rectrigger; | 839 | items[i++].function = rectrigger; |