FS#11931 part 2: Allow a short rewind when playback is paused. Patch

by John Morris.

This patch adds an option to rewind the current track by a few seconds
when it is paused, irrespective of what has caused the pause.  This is
useful for audiobooks and podcasts to allow the listener to recall
where the track was left off.

The patch subsumes the existing rewind-on-headphone-unplug feature and
extends it to all invocations of pause: play/pause button (or touch
area), headphone removal, and power-supply unplug in car-adapter
mode. It also subsumes FS#9448 (rewind on fade).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29876 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Hohmuth 2011-05-13 22:28:47 +00:00
parent 0a070c5420
commit 5aec3c2400
6 changed files with 36 additions and 26 deletions

View file

@ -173,10 +173,9 @@ MENUITEM_SETTING(cuesheet, &global_settings.cuesheet, cuesheet_callback);
#ifdef HAVE_HEADPHONE_DETECTION
MENUITEM_SETTING(unplug_mode, &global_settings.unplug_mode, NULL);
MENUITEM_SETTING(unplug_rw, &global_settings.unplug_rw, NULL);
MENUITEM_SETTING(unplug_autoresume, &global_settings.unplug_autoresume, NULL);
MAKE_MENU(unplug_menu, ID2P(LANG_HEADPHONE_UNPLUG), 0, Icon_NOICON,
&unplug_mode, &unplug_rw, &unplug_autoresume);
&unplug_mode, &unplug_autoresume);
#endif
MENUITEM_SETTING(skip_length, &global_settings.skip_length, NULL);
@ -184,6 +183,7 @@ MENUITEM_SETTING(prevent_skip, &global_settings.prevent_skip, NULL);
#if CONFIG_CODEC == SWCODEC
MENUITEM_SETTING(resume_rewind, &global_settings.resume_rewind, NULL);
#endif
MENUITEM_SETTING(pause_rewind, &global_settings.pause_rewind, NULL);
MAKE_MENU(playback_settings,ID2P(LANG_PLAYBACK),0,
Icon_Playback_menu,
@ -214,6 +214,7 @@ MAKE_MENU(playback_settings,ID2P(LANG_PLAYBACK),0,
#if CONFIG_CODEC == SWCODEC
&resume_rewind,
#endif
&pause_rewind,
);
static int playback_callback(int action,const struct menu_item_ex *this_item)