summaryrefslogtreecommitdiffstats
path: root/apps/settings_menu.c
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2005-07-21 11:44:00 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2005-07-21 11:44:00 +0000
commitf090dc382974f7d6163c2b8969440335d79845a0 (patch)
tree3562699a0ed5f41d0250417bca874bc507c65a43 /apps/settings_menu.c
parent4bee5075020aecfa7a30ba196bac0603b3be11cd (diff)
downloadrockbox-f090dc382974f7d6163c2b8969440335d79845a0.tar.gz
rockbox-f090dc382974f7d6163c2b8969440335d79845a0.zip
Crossfade (and pcm buffer size) length is now configurable.
Implemented anti-skip buffer setting for iriver also. Settings block bumped up, PLEASE SAVE YOUR SETTINGS BEFORE UPGRADING. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7210 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/settings_menu.c')
-rw-r--r--apps/settings_menu.c41
1 files changed, 37 insertions, 4 deletions
diff --git a/apps/settings_menu.c b/apps/settings_menu.c
index a94dda8b51..490970d1f6 100644
--- a/apps/settings_menu.c
+++ b/apps/settings_menu.c
@@ -917,12 +917,33 @@ static bool max_files_in_playlist(void)
NULL, 1000, 1000, 20000 );
}
+#if CONFIG_HWCODEC == MASNONE
+static bool buffer_margin(void)
+{
+ int ret;
+ static const struct opt_items names[] = {
+ { "5s", TALK_ID(5, UNIT_SEC) },
+ { "15s", TALK_ID(15, UNIT_SEC) },
+ { "30s", TALK_ID(30, UNIT_SEC) },
+ { "1min", TALK_ID(1, UNIT_MIN) },
+ { "2min", TALK_ID(2, UNIT_MIN) },
+ { "3min", TALK_ID(3, UNIT_MIN) },
+ { "5min", TALK_ID(5, UNIT_MIN) },
+ { "10min", TALK_ID(10, UNIT_MIN) }
+ };
+
+ ret = set_option(str(LANG_MP3BUFFER_MARGIN), &global_settings.buffer_margin,
+ INT, names, 8, audio_set_buffer_margin);
+ return ret;
+}
+#else
static bool buffer_margin(void)
{
return set_int(str(LANG_MP3BUFFER_MARGIN), "s", UNIT_SEC,
&global_settings.buffer_margin,
audio_set_buffer_margin, 1, 0, 7 );
}
+#endif
static bool ff_rewind_min_step(void)
{
@@ -1106,11 +1127,23 @@ static bool id3_order(void)
#if CONFIG_HWCODEC == MASNONE
static bool crossfade(void)
{
- bool rc = set_bool( str(LANG_CROSSFADE), &global_settings.crossfade );
- pcmbuf_crossfade_enable(global_settings.crossfade);
-
- return rc;
+ static const struct opt_items names[] = {
+ { STR(LANG_OFF) },
+ { "2s", TALK_ID(2, UNIT_SEC) },
+ { "4s", TALK_ID(4, UNIT_SEC) },
+ { "6s", TALK_ID(6, UNIT_SEC) },
+ { "8s", TALK_ID(8, UNIT_SEC) },
+ { "10s", TALK_ID(10, UNIT_SEC) },
+ { "12s", TALK_ID(12, UNIT_SEC) },
+ { "14s", TALK_ID(14, UNIT_SEC) },
+ };
+ bool ret;
+ ret=set_option( str(LANG_CROSSFADE), &global_settings.crossfade,
+ INT, names, 8, audio_set_crossfade_amount);
+
+ return ret;
}
+
#endif
static bool next_folder(void)