summaryrefslogtreecommitdiff
path: root/apps/settings.c
diff options
context:
space:
mode:
authorMartin Scarratt <mmmm@rockbox.org>2006-07-22 17:23:05 +0000
committerMartin Scarratt <mmmm@rockbox.org>2006-07-22 17:23:05 +0000
commit9130a2a4a710a93ecc36d57b1f2abb9332567080 (patch)
treeb8b9214c3ad15f135772c285efe80675d5594e57 /apps/settings.c
parent57327044cdfa8258b8bea8a4d837fa4a7d551aff (diff)
downloadrockbox-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/settings.c')
-rw-r--r--apps/settings.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/apps/settings.c b/apps/settings.c
index e065e78c81..8846fa4bcf 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -94,7 +94,7 @@ const char rec_base_directory[] = REC_BASE_DIR;
94#include "dsp.h" 94#include "dsp.h"
95#endif 95#endif
96 96
97#define CONFIG_BLOCK_VERSION 46 97#define CONFIG_BLOCK_VERSION 47
98#define CONFIG_BLOCK_SIZE 512 98#define CONFIG_BLOCK_SIZE 512
99#define RTC_BLOCK_SIZE 44 99#define RTC_BLOCK_SIZE 44
100 100
@@ -466,7 +466,12 @@ static const struct bit_entry hd_bits[] =
466 {1, S_O(rec_startup), false, "rec screen on startup", off_on }, 466 {1, S_O(rec_startup), false, "rec screen on startup", off_on },
467 {4, S_O(rec_timesplit), 0, "rec timesplit", /* 0...15 */ 467 {4, S_O(rec_timesplit), 0, "rec timesplit", /* 0...15 */
468 "off,00:05,00:10,00:15,00:30,01:00,01:14,01:20,02:00,04:00,06:00,08:00,10:00,12:00,18:00,24:00" }, 468 "off,00:05,00:10,00:15,00:30,01:00,01:14,01:20,02:00,04:00,06:00,08:00,10:00,12:00,18:00,24:00" },
469 {4, S_O(rec_sizesplit), 0, "rec sizesplit", /* 0...15 */
470 "off,5MB,10MB,15MB,32MB,64MB,75MB,100MB,128MB,256MB,512MB,650MB,700MB,1GB,1.5GB,1.75GB" },
469 {1, S_O(rec_channels), 0, "rec channels", "stereo,mono" }, 471 {1, S_O(rec_channels), 0, "rec channels", "stereo,mono" },
472 {1, S_O(rec_split_type), 0, "rec split type", "Split, Stop" },
473 {1, S_O(rec_split_method), 0, "rec split method", "Time,Filesize" },
474
470#ifdef HAVE_SPDIF_IN 475#ifdef HAVE_SPDIF_IN
471 {2, S_O(rec_source), 0 /* 0=mic */, "rec source", "mic,line,spdif" }, 476 {2, S_O(rec_source), 0 /* 0=mic */, "rec source", "mic,line,spdif" },
472#else 477#else
@@ -1929,6 +1934,31 @@ unsigned int rec_timesplit_seconds(void)
1929 return rec_timer_seconds[global_settings.rec_timesplit]; 1934 return rec_timer_seconds[global_settings.rec_timesplit];
1930} 1935}
1931 1936
1937/* This array holds the record size interval lengths, in bytes */
1938static const unsigned long rec_size_bytes[] =
1939{
1940 0, /* 0 means OFF */
1941 5*1024*1024, /* 5MB */
1942 10*1024*1024, /* 10MB */
1943 15*1024*1024, /* 15MB */
1944 32*1024*1024, /* 32MB */
1945 64*1024*1024, /* 64MB */
1946 75*1024*1024, /* 75MB */
1947 100*1024*1024, /* 100MB */
1948 128*1024*1024, /* 128MB */
1949 256*1024*1024, /* 256MB */
1950 512*1024*1024, /* 512MB */
1951 650*1024*1024, /* 650MB */
1952 700*1024*1024, /* 700MB */
1953 1024*1024*1024, /* 1GB */
1954 1536*1024*1024, /* 1.5GB */
1955 1792*1024*1024, /* 1.75GB */
1956};
1957
1958unsigned long rec_sizesplit_bytes(void)
1959{
1960 return rec_size_bytes[global_settings.rec_sizesplit];
1961}
1932/* 1962/*
1933 * Time strings used for the trigger durations. 1963 * Time strings used for the trigger durations.
1934 * Keep synchronous to trigger_times in settings_apply_trigger 1964 * Keep synchronous to trigger_times in settings_apply_trigger