1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2002 Björn Stenberg
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
27 #include "mp3_playback.h"
31 #ifdef HAVE_LCD_BITMAP
41 #if CONFIG_CODEC == MAS3587F
42 #include "peakmeter.h"
46 int selected_setting
; /* Used by the callback */
47 void dec_sound_formatter(char *buffer
, int buffer_size
, int val
, const char * unit
)
49 val
= sound_val2phys(selected_setting
, val
);
50 int integer
= val
/ 10;
52 snprintf(buffer
, buffer_size
, "%d.%d %s", integer
, dec
, unit
);
55 bool set_sound(const char* string
,
59 int talkunit
= UNIT_INT
;
60 const char* unit
= sound_unit(setting
);
61 int numdec
= sound_numdecimals(setting
);
62 int steps
= sound_steps(setting
);
63 int min
= sound_min(setting
);
64 int max
= sound_max(setting
);
65 sound_set_type
* sound_callback
= sound_get_fn(setting
);
66 if (*unit
== 'd') /* crude reconstruction */
68 else if (*unit
== '%')
69 talkunit
= UNIT_PERCENT
;
70 else if (*unit
== 'H')
71 talkunit
= UNIT_HERTZ
;
73 return set_int(string
, unit
, talkunit
, variable
, sound_callback
,
74 steps
, min
, max
, NULL
);
77 selected_setting
=setting
;
78 return set_int(string
, unit
, talkunit
, variable
, sound_callback
,
79 steps
, min
, max
, &dec_sound_formatter
);
83 static bool volume(void)
85 return set_sound(str(LANG_VOLUME
), &global_settings
.volume
, SOUND_VOLUME
);
88 static bool balance(void)
90 return set_sound(str(LANG_BALANCE
), &global_settings
.balance
,
94 static bool bass(void)
96 return set_sound(str(LANG_BASS
), &global_settings
.bass
, SOUND_BASS
);
99 static bool treble(void)
101 return set_sound(str(LANG_TREBLE
), &global_settings
.treble
, SOUND_TREBLE
);
104 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
105 static bool loudness(void)
107 return set_sound(str(LANG_LOUDNESS
), &global_settings
.loudness
,
111 static bool mdb_strength(void)
113 return set_sound(str(LANG_MDB_STRENGTH
), &global_settings
.mdb_strength
,
117 static bool mdb_harmonics(void)
119 return set_sound(str(LANG_MDB_HARMONICS
), &global_settings
.mdb_harmonics
,
120 SOUND_MDB_HARMONICS
);
123 static bool mdb_center(void)
125 return set_sound(str(LANG_MDB_CENTER
), &global_settings
.mdb_center
,
129 static bool mdb_shape(void)
131 return set_sound(str(LANG_MDB_SHAPE
), &global_settings
.mdb_shape
,
135 static void set_mdb_enable(bool value
)
137 sound_set_mdb_enable((int)value
);
140 static bool mdb_enable(void)
142 return set_bool_options(str(LANG_MDB_ENABLE
),
143 &global_settings
.mdb_enable
,
144 STR(LANG_SET_BOOL_YES
),
145 STR(LANG_SET_BOOL_NO
),
149 static void set_superbass(bool value
)
151 sound_set_superbass((int)value
);
154 static bool superbass(void)
156 return set_bool_options(str(LANG_SUPERBASS
),
157 &global_settings
.superbass
,
158 STR(LANG_SET_BOOL_YES
),
159 STR(LANG_SET_BOOL_NO
),
163 static bool avc(void)
165 static const struct opt_items names
[] = {
167 { "20ms", TALK_ID(20, UNIT_MS
) },
168 { "2s", TALK_ID(2, UNIT_SEC
) },
169 { "4s", TALK_ID(4, UNIT_SEC
) },
170 { "8s", TALK_ID(8, UNIT_SEC
) }
172 return set_option(str(LANG_DECAY
), &global_settings
.avc
, INT
,
173 names
, 5, sound_set_avc
);
177 #ifdef HAVE_RECORDING
178 static bool recsource(void)
180 static const struct opt_items names
[] = {
181 { STR(LANG_RECORDING_SRC_MIC
) },
182 { STR(LANG_RECORDING_SRC_LINE
) },
184 { STR(LANG_RECORDING_SRC_DIGITAL
) },
187 return set_option(str(LANG_RECORDING_SOURCE
),
188 &global_settings
.rec_source
, INT
, names
,
189 sizeof(names
)/sizeof(struct opt_items
), NULL
);
192 static bool recfrequency(void)
194 static const struct opt_items names
[] = {
195 { "44.1kHz", TALK_ID(44, UNIT_KHZ
) },
196 { "48kHz", TALK_ID(48, UNIT_KHZ
) },
197 { "32kHz", TALK_ID(32, UNIT_KHZ
) },
198 { "22.05kHz", TALK_ID(22, UNIT_KHZ
) },
199 { "24kHz", TALK_ID(24, UNIT_KHZ
) },
200 { "16kHz", TALK_ID(16, UNIT_KHZ
) }
202 return set_option(str(LANG_RECORDING_FREQUENCY
),
203 &global_settings
.rec_frequency
, INT
,
207 static bool recchannels(void)
209 static const struct opt_items names
[] = {
210 { STR(LANG_CHANNEL_STEREO
) },
211 { STR(LANG_CHANNEL_MONO
) }
213 return set_option(str(LANG_RECORDING_CHANNELS
),
214 &global_settings
.rec_channels
, INT
,
218 static bool recquality(void)
220 return set_int(str(LANG_RECORDING_QUALITY
), "", UNIT_INT
,
221 &global_settings
.rec_quality
,
222 NULL
, 1, 0, 7, NULL
);
225 static bool receditable(void)
227 return set_bool(str(LANG_RECORDING_EDITABLE
),
228 &global_settings
.rec_editable
);
231 static bool rectimesplit(void)
233 static const struct opt_items names
[] = {
235 { "00:05" , TALK_ID(5, UNIT_MIN
) },
236 { "00:10" , TALK_ID(10, UNIT_MIN
) },
237 { "00:15" , TALK_ID(15, UNIT_MIN
) },
238 { "00:30" , TALK_ID(30, UNIT_MIN
) },
239 { "01:00" , TALK_ID(1, UNIT_HOUR
) },
240 { "01:14" , TALK_ID(74, UNIT_MIN
) },
241 { "01:20" , TALK_ID(80, UNIT_MIN
) },
242 { "02:00" , TALK_ID(2, UNIT_HOUR
) },
243 { "04:00" , TALK_ID(4, UNIT_HOUR
) },
244 { "06:00" , TALK_ID(6, UNIT_HOUR
) },
245 { "08:00" , TALK_ID(8, UNIT_HOUR
) },
246 { "10:00" , TALK_ID(10, UNIT_HOUR
) },
247 { "12:00" , TALK_ID(12, UNIT_HOUR
) },
248 { "18:00" , TALK_ID(18, UNIT_HOUR
) },
249 { "24:00" , TALK_ID(24, UNIT_HOUR
) }
251 return set_option(str(LANG_RECORD_TIMESPLIT
),
252 &global_settings
.rec_timesplit
, INT
,
256 static bool recprerecord(void)
258 static const struct opt_items names
[] = {
260 { "1s", TALK_ID(1, UNIT_SEC
) },
261 { "2s", TALK_ID(2, UNIT_SEC
) },
262 { "3s", TALK_ID(3, UNIT_SEC
) },
263 { "4s", TALK_ID(4, UNIT_SEC
) },
264 { "5s", TALK_ID(5, UNIT_SEC
) },
265 { "6s", TALK_ID(6, UNIT_SEC
) },
266 { "7s", TALK_ID(7, UNIT_SEC
) },
267 { "8s", TALK_ID(8, UNIT_SEC
) },
268 { "9s", TALK_ID(9, UNIT_SEC
) },
269 { "10s", TALK_ID(10, UNIT_SEC
) },
270 { "11s", TALK_ID(11, UNIT_SEC
) },
271 { "12s", TALK_ID(12, UNIT_SEC
) },
272 { "13s", TALK_ID(13, UNIT_SEC
) },
273 { "14s", TALK_ID(14, UNIT_SEC
) },
274 { "15s", TALK_ID(15, UNIT_SEC
) },
275 { "16s", TALK_ID(16, UNIT_SEC
) },
276 { "17s", TALK_ID(17, UNIT_SEC
) },
277 { "18s", TALK_ID(18, UNIT_SEC
) },
278 { "19s", TALK_ID(19, UNIT_SEC
) },
279 { "20s", TALK_ID(20, UNIT_SEC
) },
280 { "21s", TALK_ID(21, UNIT_SEC
) },
281 { "22s", TALK_ID(22, UNIT_SEC
) },
282 { "23s", TALK_ID(23, UNIT_SEC
) },
283 { "24s", TALK_ID(24, UNIT_SEC
) },
284 { "25s", TALK_ID(25, UNIT_SEC
) },
285 { "26s", TALK_ID(26, UNIT_SEC
) },
286 { "27s", TALK_ID(27, UNIT_SEC
) },
287 { "28s", TALK_ID(28, UNIT_SEC
) },
288 { "29s", TALK_ID(29, UNIT_SEC
) },
289 { "30s", TALK_ID(30, UNIT_SEC
) }
291 return set_option(str(LANG_RECORD_PRERECORD_TIME
),
292 &global_settings
.rec_prerecord_time
, INT
,
296 static bool recdirectory(void)
298 static const struct opt_items names
[] = {
299 { rec_base_directory
, -1 },
300 { STR(LANG_RECORD_CURRENT_DIR
) }
302 return set_option(str(LANG_RECORD_DIRECTORY
),
303 &global_settings
.rec_directory
, INT
,
307 static bool reconstartup(void)
309 return set_bool(str(LANG_RECORD_STARTUP
),
310 &global_settings
.rec_startup
);
313 #endif /* MAS3587F */
315 static bool chanconf(void)
317 static const struct opt_items names
[] = {
318 { STR(LANG_CHANNEL_STEREO
) },
319 { STR(LANG_CHANNEL_MONO
) },
320 { STR(LANG_CHANNEL_CUSTOM
) },
321 { STR(LANG_CHANNEL_LEFT
) },
322 { STR(LANG_CHANNEL_RIGHT
) },
323 { STR(LANG_CHANNEL_KARAOKE
) }
325 return set_option(str(LANG_CHANNEL
), &global_settings
.channel_config
, INT
,
326 names
, 6, sound_set_channels
);
329 static bool stereo_width(void)
331 return set_sound(str(LANG_STEREO_WIDTH
), &global_settings
.stereo_width
,
335 bool sound_menu(void)
339 static const struct menu_item items
[] = {
340 { ID2P(LANG_VOLUME
), volume
},
341 { ID2P(LANG_BASS
), bass
},
342 { ID2P(LANG_TREBLE
), treble
},
343 { ID2P(LANG_BALANCE
), balance
},
344 { ID2P(LANG_CHANNEL_MENU
), chanconf
},
345 { ID2P(LANG_STEREO_WIDTH
), stereo_width
},
346 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
347 { ID2P(LANG_LOUDNESS
), loudness
},
348 { ID2P(LANG_AUTOVOL
), avc
},
349 { ID2P(LANG_SUPERBASS
), superbass
},
350 { ID2P(LANG_MDB_ENABLE
), mdb_enable
},
351 { ID2P(LANG_MDB_STRENGTH
), mdb_strength
},
352 { ID2P(LANG_MDB_HARMONICS
), mdb_harmonics
},
353 { ID2P(LANG_MDB_CENTER
), mdb_center
},
354 { ID2P(LANG_MDB_SHAPE
), mdb_shape
},
358 m
=menu_init( items
, sizeof(items
) / sizeof(*items
), NULL
,
360 result
= menu_run(m
);
366 #ifdef HAVE_RECORDING
367 enum trigger_menu_option
379 #if !defined(SIMULATOR) && CONFIG_CODEC == MAS3587F
380 static char* create_thres_str(int threshold
)
382 static char retval
[6];
384 if (threshold
< -88) {
385 snprintf (retval
, sizeof retval
, "%s", str(LANG_DB_INF
));
387 snprintf (retval
, sizeof retval
, "%ddb", threshold
+ 1);
390 snprintf (retval
, sizeof retval
, "%d%%", threshold
);
396 static void change_threshold(int *threshold
, int change
)
398 if (global_settings
.peak_meter_dbfs
) {
399 if (*threshold
>= 0) {
400 int db
= (calc_db(*threshold
* MAX_PEAK
/ 100) - 9000) / 100;
403 *threshold
+= change
;
404 if (*threshold
> -1) {
406 } else if (*threshold
< INF_DB
) {
410 if (*threshold
< 0) {
411 *threshold
= peak_meter_db2sample(*threshold
* 100) * 100 / MAX_PEAK
;
413 *threshold
+= change
;
414 if (*threshold
> 100) {
416 } else if (*threshold
< 0) {
422 /* Variable button definitions */
423 #if CONFIG_KEYPAD == RECORDER_PAD
424 #define TRIG_CANCEL BUTTON_OFF
425 #define TRIG_ACCEPT BUTTON_PLAY
426 #define TRIG_RESET_SIM BUTTON_F2
428 #elif CONFIG_KEYPAD == ONDIO_PAD
429 #define TRIG_CANCEL BUTTON_OFF
430 #define TRIG_ACCEPT BUTTON_MENU
434 * Displays a menu for editing the trigger settings.
436 bool rectrigger(void)
438 int exit_request
= false;
439 enum trigger_menu_option selected
= TRIGGER_MODE
;
441 int old_x_margin
, old_y_margin
;
443 #define TRIGGER_MODE_COUNT 3
444 static const unsigned char *trigger_modes
[] = {
446 ID2P(LANG_RECORD_TRIG_NOREARM
),
447 ID2P(LANG_RECORD_TRIG_REARM
)
450 #define PRERECORD_TIMES_COUNT 31
451 static const unsigned char *prerecord_times
[] = {
452 ID2P(LANG_OFF
),"1s","2s", "3s", "4s", "5s", "6s", "7s", "8s", "9s",
453 "10s", "11s", "12s", "13s", "14s", "15s", "16s", "17s", "18s", "19s",
454 "20s", "21s", "22s", "23s", "24s", "25s", "26s", "27s", "28s", "29s",
458 static const unsigned char *option_name
[] = {
459 [TRIGGER_MODE
] = ID2P(LANG_RECORD_TRIGGER_MODE
),
460 [PRERECORD_TIME
] = ID2P(LANG_RECORD_PRERECORD_TIME
),
461 [START_THRESHOLD
] = ID2P(LANG_RECORD_START_THRESHOLD
),
462 [START_DURATION
] = ID2P(LANG_RECORD_MIN_DURATION
),
463 [STOP_THRESHOLD
] = ID2P(LANG_RECORD_STOP_THRESHOLD
),
464 [STOP_POSTREC
] = ID2P(LANG_RECORD_STOP_POSTREC
),
465 [STOP_GAP
] = ID2P(LANG_RECORD_STOP_GAP
)
468 int old_start_thres
= global_settings
.rec_start_thres
;
469 int old_start_duration
= global_settings
.rec_start_duration
;
470 int old_prerecord_time
= global_settings
.rec_prerecord_time
;
471 int old_stop_thres
= global_settings
.rec_stop_thres
;
472 int old_stop_postrec
= global_settings
.rec_stop_postrec
;
473 int old_stop_gap
= global_settings
.rec_stop_gap
;
474 int old_trigger_mode
= global_settings
.rec_trigger_mode
;
480 /* restart trigger with new values */
481 settings_apply_trigger();
482 peak_meter_trigger (global_settings
.rec_trigger_mode
!= TRIG_MODE_OFF
);
486 old_x_margin
= lcd_getxmargin();
487 old_y_margin
= lcd_getymargin();
488 if(global_settings
.statusbar
)
489 lcd_setmargins(0, STATUSBAR_HEIGHT
);
491 lcd_setmargins(0, 0);
493 lcd_getstringsize("M", &w
, &h
);
495 // two lines are reserved for peak meter and trigger status
496 option_lines
= (LCD_HEIGHT
/h
) - (global_settings
.statusbar
? 1:0) - 2;
498 while (!exit_request
) {
499 int stat_height
= global_settings
.statusbar
? STATUSBAR_HEIGHT
: 0;
502 char option_value
[TRIG_OPTION_COUNT
][7];
505 option_value
[TRIGGER_MODE
],
506 sizeof option_value
[TRIGGER_MODE
],
508 P2STR(trigger_modes
[global_settings
.rec_trigger_mode
]));
511 option_value
[PRERECORD_TIME
],
512 sizeof option_value
[PRERECORD_TIME
],
514 P2STR(prerecord_times
[global_settings
.rec_prerecord_time
]));
516 /* due to value range shift (peak_meter_define_trigger) -1 is 0db */
517 if (global_settings
.rec_start_thres
== -1) {
520 str
= create_thres_str(global_settings
.rec_start_thres
);
523 option_value
[START_THRESHOLD
],
524 sizeof option_value
[START_THRESHOLD
],
529 option_value
[START_DURATION
],
530 sizeof option_value
[START_DURATION
],
532 trig_durations
[global_settings
.rec_start_duration
]);
535 if (global_settings
.rec_stop_thres
<= INF_DB
) {
538 str
= create_thres_str(global_settings
.rec_stop_thres
);
541 option_value
[STOP_THRESHOLD
],
542 sizeof option_value
[STOP_THRESHOLD
],
547 option_value
[STOP_POSTREC
],
548 sizeof option_value
[STOP_POSTREC
],
550 trig_durations
[global_settings
.rec_stop_postrec
]);
553 option_value
[STOP_GAP
],
554 sizeof option_value
[STOP_GAP
],
556 trig_durations
[global_settings
.rec_stop_gap
]);
558 lcd_set_drawmode(DRMODE_SOLID
|DRMODE_INVERSEVID
);
559 lcd_fillrect(0, stat_height
, LCD_WIDTH
, LCD_HEIGHT
- stat_height
);
560 lcd_set_drawmode(DRMODE_SOLID
);
563 /* reselect FONT_SYSFONT as status_draw has changed the font */
564 /*lcd_setfont(FONT_SYSFIXED);*/
566 for (i
= 0; i
< option_lines
; i
++) {
569 str
= P2STR(option_name
[i
+ offset
]);
570 lcd_putsxy(5, stat_height
+ i
* h
, str
);
572 str
= option_value
[i
+ offset
];
573 lcd_getstringsize(str
, &w
, &h
);
574 y
= stat_height
+ i
* h
;
576 lcd_putsxy(x
, y
, str
);
577 if ((int)selected
== (i
+ offset
)) {
578 lcd_set_drawmode(DRMODE_COMPLEMENT
);
579 lcd_fillrect(x
, y
, w
, h
);
580 lcd_set_drawmode(DRMODE_SOLID
);
584 scrollbar(0, stat_height
,
585 4, LCD_HEIGHT
- 16 - stat_height
,
586 TRIG_OPTION_COUNT
, offset
, offset
+ option_lines
,
589 peak_meter_draw_trig(0, LCD_HEIGHT
- 8 - TRIG_HEIGHT
);
591 button
= peak_meter_draw_get_btn(0, LCD_HEIGHT
- 8, LCD_WIDTH
, 8);
597 splash(50, true, str(LANG_RESET_DONE_CANCEL
));
598 global_settings
.rec_start_thres
= old_start_thres
;
599 global_settings
.rec_start_duration
= old_start_duration
;
600 global_settings
.rec_prerecord_time
= old_prerecord_time
;
601 global_settings
.rec_stop_thres
= old_stop_thres
;
602 global_settings
.rec_stop_postrec
= old_stop_postrec
;
603 global_settings
.rec_stop_gap
= old_stop_gap
;
604 global_settings
.rec_trigger_mode
= old_trigger_mode
;
613 selected
+= TRIG_OPTION_COUNT
- 1;
614 selected
%= TRIG_OPTION_COUNT
;
615 offset
= MIN(offset
, (int)selected
);
616 offset
= MAX(offset
, (int)selected
- option_lines
+ 1);
621 selected
%= TRIG_OPTION_COUNT
;
622 offset
= MIN(offset
, (int)selected
);
623 offset
= MAX(offset
, (int)selected
- option_lines
+ 1);
627 case BUTTON_RIGHT
| BUTTON_REPEAT
:
630 global_settings
.rec_trigger_mode
++;
631 global_settings
.rec_trigger_mode
%= TRIGGER_MODE_COUNT
;
635 global_settings
.rec_prerecord_time
++;
636 global_settings
.rec_prerecord_time
%= PRERECORD_TIMES_COUNT
;
639 case START_THRESHOLD
:
640 change_threshold(&global_settings
.rec_start_thres
, 1);
644 global_settings
.rec_start_duration
++;
645 global_settings
.rec_start_duration
%= TRIG_DURATION_COUNT
;
649 change_threshold(&global_settings
.rec_stop_thres
, 1);
653 global_settings
.rec_stop_postrec
++;
654 global_settings
.rec_stop_postrec
%= TRIG_DURATION_COUNT
;
658 global_settings
.rec_stop_gap
++;
659 global_settings
.rec_stop_gap
%= TRIG_DURATION_COUNT
;
662 case TRIG_OPTION_COUNT
:
663 // avoid compiler warnings
666 peak_meter_trigger(global_settings
.rec_trigger_mode
!=TRIG_OFF
);
667 settings_apply_trigger();
671 case BUTTON_LEFT
| BUTTON_REPEAT
:
674 global_settings
.rec_trigger_mode
+=TRIGGER_MODE_COUNT
-1;
675 global_settings
.rec_trigger_mode
%= TRIGGER_MODE_COUNT
;
679 global_settings
.rec_prerecord_time
+= PRERECORD_TIMES_COUNT
- 1;
680 global_settings
.rec_prerecord_time
%= PRERECORD_TIMES_COUNT
;
683 case START_THRESHOLD
:
684 change_threshold(&global_settings
.rec_start_thres
, -1);
688 global_settings
.rec_start_duration
+= TRIG_DURATION_COUNT
-1;
689 global_settings
.rec_start_duration
%= TRIG_DURATION_COUNT
;
693 change_threshold(&global_settings
.rec_stop_thres
, -1);
697 global_settings
.rec_stop_postrec
+=
698 TRIG_DURATION_COUNT
- 1;
699 global_settings
.rec_stop_postrec
%=
704 global_settings
.rec_stop_gap
+=
705 TRIG_DURATION_COUNT
- 1;
706 global_settings
.rec_stop_gap
%= TRIG_DURATION_COUNT
;
709 case TRIG_OPTION_COUNT
:
710 // avoid compiler warnings
713 peak_meter_trigger(global_settings
.rec_trigger_mode
!=TRIG_OFF
);
714 settings_apply_trigger();
717 #ifdef TRIG_RESET_SIM
719 peak_meter_trigger(true);
723 case SYS_USB_CONNECTED
:
724 if(default_event_handler(button
) == SYS_USB_CONNECTED
) {
732 peak_meter_trigger(false);
733 lcd_setfont(FONT_UI
);
734 lcd_setmargins(old_x_margin
, old_y_margin
);
739 bool recording_menu(bool no_source
)
743 struct menu_item items
[10];
746 items
[i
].desc
= ID2P(LANG_RECORDING_QUALITY
);
747 items
[i
++].function
= recquality
;
748 items
[i
].desc
= ID2P(LANG_RECORDING_FREQUENCY
);
749 items
[i
++].function
= recfrequency
;
751 items
[i
].desc
= ID2P(LANG_RECORDING_SOURCE
);
752 items
[i
++].function
= recsource
;
754 items
[i
].desc
= ID2P(LANG_RECORDING_CHANNELS
);
755 items
[i
++].function
= recchannels
;
756 items
[i
].desc
= ID2P(LANG_RECORDING_EDITABLE
);
757 items
[i
++].function
= receditable
;
758 items
[i
].desc
= ID2P(LANG_RECORD_TIMESPLIT
);
759 items
[i
++].function
= rectimesplit
;
760 items
[i
].desc
= ID2P(LANG_RECORD_PRERECORD_TIME
);
761 items
[i
++].function
= recprerecord
;
762 items
[i
].desc
= ID2P(LANG_RECORD_DIRECTORY
);
763 items
[i
++].function
= recdirectory
;
764 items
[i
].desc
= ID2P(LANG_RECORD_STARTUP
);
765 items
[i
++].function
= reconstartup
;
766 #if !defined(SIMULATOR) && CONFIG_CODEC == MAS3587F
767 items
[i
].desc
= ID2P(LANG_RECORD_TRIGGER
);
768 items
[i
++].function
= rectrigger
;
771 m
=menu_init( items
, i
, NULL
, NULL
, NULL
, NULL
);
772 result
= menu_run(m
);