diff options
author | Martin Scarratt <mmmm@rockbox.org> | 2006-07-22 17:23:05 +0000 |
---|---|---|
committer | Martin Scarratt <mmmm@rockbox.org> | 2006-07-22 17:23:05 +0000 |
commit | 9130a2a4a710a93ecc36d57b1f2abb9332567080 (patch) | |
tree | b8b9214c3ad15f135772c285efe80675d5594e57 /apps/sound_menu.c | |
parent | 57327044cdfa8258b8bea8a4d837fa4a7d551aff (diff) | |
download | rockbox-9130a2a4a710a93ecc36d57b1f2abb9332567080.tar.gz rockbox-9130a2a4a710a93ecc36d57b1f2abb9332567080.zip |
Added options to timesplit recording feature (now renamed filesplit). Choose to split file by either time or filesize. Also have the option to either start a new file or stop recording at split point. Bumped config version so save your settings before you update your build.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10285 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/sound_menu.c')
-rw-r--r-- | apps/sound_menu.c | 70 |
1 files changed, 68 insertions, 2 deletions
diff --git a/apps/sound_menu.c b/apps/sound_menu.c index d8d5d4ef75..0d65bd8b9e 100644 --- a/apps/sound_menu.c +++ b/apps/sound_menu.c | |||
@@ -366,11 +366,77 @@ static bool rectimesplit(void) | |||
366 | { "18:00" , TALK_ID(18, UNIT_HOUR) }, | 366 | { "18:00" , TALK_ID(18, UNIT_HOUR) }, |
367 | { "24:00" , TALK_ID(24, UNIT_HOUR) } | 367 | { "24:00" , TALK_ID(24, UNIT_HOUR) } |
368 | }; | 368 | }; |
369 | return set_option(str(LANG_RECORD_TIMESPLIT), | 369 | return set_option(str(LANG_SPLIT_TIME), |
370 | &global_settings.rec_timesplit, INT, | 370 | &global_settings.rec_timesplit, INT, |
371 | names, 16, NULL ); | 371 | names, 16, NULL ); |
372 | } | 372 | } |
373 | 373 | ||
374 | static bool recsizesplit(void) | ||
375 | { | ||
376 | static const struct opt_items names[] = { | ||
377 | { STR(LANG_OFF) }, | ||
378 | { "5MB" , TALK_ID(5, UNIT_MB) }, | ||
379 | { "10MB" , TALK_ID(10, UNIT_MB) }, | ||
380 | { "15MB" , TALK_ID(15, UNIT_MB) }, | ||
381 | { "32MB" , TALK_ID(32, UNIT_MB) }, | ||
382 | { "64MB" , TALK_ID(64, UNIT_MB) }, | ||
383 | { "75MB" , TALK_ID(75, UNIT_MB) }, | ||
384 | { "100MB" , TALK_ID(100, UNIT_MB) }, | ||
385 | { "128MB" , TALK_ID(128, UNIT_MB) }, | ||
386 | { "256MB" , TALK_ID(256, UNIT_MB) }, | ||
387 | { "512MB" , TALK_ID(512, UNIT_MB) }, | ||
388 | { "650MB" , TALK_ID(650, UNIT_MB) }, | ||
389 | { "700MB" , TALK_ID(700, UNIT_MB) }, | ||
390 | { "1GB" , TALK_ID(1024, UNIT_MB) }, | ||
391 | { "1.5GB" , TALK_ID(1536, UNIT_MB) }, | ||
392 | { "1.75GB" , TALK_ID(1792, UNIT_MB) } | ||
393 | }; | ||
394 | return set_option(str(LANG_SPLIT_SIZE), | ||
395 | &global_settings.rec_sizesplit, INT, | ||
396 | names, 16, NULL ); | ||
397 | } | ||
398 | |||
399 | static bool splitmethod(void) | ||
400 | { | ||
401 | static const struct opt_items names[] = { | ||
402 | { STR(LANG_REC_TIME) }, | ||
403 | { STR(LANG_REC_SIZE) }, | ||
404 | }; | ||
405 | bool ret; | ||
406 | ret=set_option( str(LANG_SPLIT_MEASURE), | ||
407 | &global_settings.rec_split_method, INT, names, 2, NULL); | ||
408 | return ret; | ||
409 | } | ||
410 | |||
411 | static bool splittype(void) | ||
412 | { | ||
413 | static const struct opt_items names[] = { | ||
414 | { STR(LANG_START_NEW_FILE) }, | ||
415 | { STR(LANG_STOP_RECORDING) }, | ||
416 | }; | ||
417 | bool ret; | ||
418 | ret=set_option( str(LANG_SPLIT_TYPE), | ||
419 | &global_settings.rec_split_type, INT, names, 2, NULL); | ||
420 | return ret; | ||
421 | } | ||
422 | |||
423 | static bool filesplitoptionsmenu(void) | ||
424 | { | ||
425 | int m; | ||
426 | bool result; | ||
427 | |||
428 | static const struct menu_item items[] = { | ||
429 | { ID2P(LANG_SPLIT_MEASURE), splitmethod }, | ||
430 | { ID2P(LANG_SPLIT_TYPE), splittype }, | ||
431 | { ID2P(LANG_SPLIT_TIME), rectimesplit }, | ||
432 | { ID2P(LANG_SPLIT_SIZE), recsizesplit } | ||
433 | }; | ||
434 | m=menu_init( items, sizeof(items) / sizeof(*items), NULL, | ||
435 | NULL, NULL, NULL); | ||
436 | result = menu_run(m); | ||
437 | menu_exit(m); | ||
438 | return result; | ||
439 | } | ||
374 | static bool recprerecord(void) | 440 | static bool recprerecord(void) |
375 | { | 441 | { |
376 | static const struct opt_items names[] = { | 442 | static const struct opt_items names[] = { |
@@ -931,7 +997,7 @@ bool recording_menu(bool no_source) | |||
931 | items[i++].function = receditable; | 997 | items[i++].function = receditable; |
932 | #endif | 998 | #endif |
933 | items[i].desc = ID2P(LANG_RECORD_TIMESPLIT); | 999 | items[i].desc = ID2P(LANG_RECORD_TIMESPLIT); |
934 | items[i++].function = rectimesplit; | 1000 | items[i++].function = filesplitoptionsmenu; |
935 | items[i].desc = ID2P(LANG_RECORD_PRERECORD_TIME); | 1001 | items[i].desc = ID2P(LANG_RECORD_PRERECORD_TIME); |
936 | items[i++].function = recprerecord; | 1002 | items[i++].function = recprerecord; |
937 | items[i].desc = ID2P(LANG_RECORD_DIRECTORY); | 1003 | items[i].desc = ID2P(LANG_RECORD_DIRECTORY); |