FS#11931 - Do a short rewind when playback is paused
Opened by John Morris (JohnMorris) - Sunday, 13 February 2011, 05:00 GMT
Last edited by sideral (sideral) - Friday, 13 May 2011, 23:03 GMT
[EDIT: The scope of this patch has evolved over the discussion below. I'm updating the description for the benefit of the casual lurker. The description refers to the latest patch revision posted in the comments section. –sideral]
This patch adds an option to rewind the current track by a few seconds when it is paused. 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
In passing, this also makes the fade in/out behavior more consistent across all pause causes. Previously there was no fade-in on headphone insertion (which seems like a particularly good place to have fade in, BTW), nor on unpause on car adapter mode. [EDIT: This part has been committed as r29844/r29845.]
As a result of this refactoring, this patch actually slightly reduces the number of lines of C source code.
[John Morris' original description of his originally submitted patch follows:]
This short patch adds an automatic rewind when in car-adapter mode. When the power goes - the car is stopped - off the track will be rewound by ten seconds (or to the start of the track if that's less than ten seconds). This is particularly effective for audiobooks, to recall where the story left off.
Friday, 13 May 2011, 23:03 GMT
Reason for closing: Accepted
Additional comments about closing: The feature (patch 0002) has been committed (along with the necessary manual changes) as r29876–r29878. Thanks for doing the hard part of the work, John Morris!