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.zip
rockbox-9130a2a4a710a93ecc36d57b1f2abb9332567080.tar.gz
rockbox-9130a2a4a710a93ecc36d57b1f2abb9332567080.tar.bz2
rockbox-9130a2a4a710a93ecc36d57b1f2abb9332567080.tar.xz
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 e065e78..8846fa4 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -94,7 +94,7 @@ const char rec_base_directory[] = REC_BASE_DIR;
#include "dsp.h"
#endif
-#define CONFIG_BLOCK_VERSION 46
+#define CONFIG_BLOCK_VERSION 47
#define CONFIG_BLOCK_SIZE 512
#define RTC_BLOCK_SIZE 44
@@ -466,7 +466,12 @@ static const struct bit_entry hd_bits[] =
{1, S_O(rec_startup), false, "rec screen on startup", off_on },
{4, S_O(rec_timesplit), 0, "rec timesplit", /* 0...15 */
"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" },
+ {4, S_O(rec_sizesplit), 0, "rec sizesplit", /* 0...15 */
+ "off,5MB,10MB,15MB,32MB,64MB,75MB,100MB,128MB,256MB,512MB,650MB,700MB,1GB,1.5GB,1.75GB" },
{1, S_O(rec_channels), 0, "rec channels", "stereo,mono" },
+ {1, S_O(rec_split_type), 0, "rec split type", "Split, Stop" },
+ {1, S_O(rec_split_method), 0, "rec split method", "Time,Filesize" },
+
#ifdef HAVE_SPDIF_IN
{2, S_O(rec_source), 0 /* 0=mic */, "rec source", "mic,line,spdif" },
#else
@@ -1929,6 +1934,31 @@ unsigned int rec_timesplit_seconds(void)
return rec_timer_seconds[global_settings.rec_timesplit];
}
+/* This array holds the record size interval lengths, in bytes */
+static const unsigned long rec_size_bytes[] =
+{
+ 0, /* 0 means OFF */
+ 5*1024*1024, /* 5MB */
+ 10*1024*1024, /* 10MB */
+ 15*1024*1024, /* 15MB */
+ 32*1024*1024, /* 32MB */
+ 64*1024*1024, /* 64MB */
+ 75*1024*1024, /* 75MB */
+ 100*1024*1024, /* 100MB */
+ 128*1024*1024, /* 128MB */
+ 256*1024*1024, /* 256MB */
+ 512*1024*1024, /* 512MB */
+ 650*1024*1024, /* 650MB */
+ 700*1024*1024, /* 700MB */
+ 1024*1024*1024, /* 1GB */
+ 1536*1024*1024, /* 1.5GB */
+ 1792*1024*1024, /* 1.75GB */
+};
+
+unsigned long rec_sizesplit_bytes(void)
+{
+ return rec_size_bytes[global_settings.rec_sizesplit];
+}
/*
* Time strings used for the trigger durations.
* Keep synchronous to trigger_times in settings_apply_trigger