Notice: A non well formed numeric value encountered in /sites/ on line 96 Notice: A non well formed numeric value encountered in /sites/ on line 96 Notice: A non well formed numeric value encountered in /sites/ on line 96 Deprecated: Function create_function() is deprecated in /sites/ on line 104 Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /sites/ on line 845 Deprecated: Function create_function() is deprecated in /sites/ on line 111 FS#9448 : Rewind on fade



FS#9448 - Rewind on fade

Attached to Project: Rockbox
Opened by Michael Chicoine (mc2739) - Friday, 03 October 2008, 20:50 GMT
Last edited by sideral (sideral) - Friday, 13 May 2011, 23:03 GMT
Task Type Patches
Category Music playback
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


This patch rewinds the current title when resuming from pause if fade in/out is enabled. It is based on the headphone detection code. The rewind amount is hard coded at 2 seconds. I plan to add settings to enable/disable and adjust rewind.
This task depends upon

Closed by  sideral (sideral)
Friday, 13 May 2011, 23:03 GMT
Reason for closing:  Out of Date
Additional comments about closing:  Subsumed by  FS#11931 , which was committed in r29876–r29878.
Comment by Michael Chicoine (mc2739) - Saturday, 04 October 2008, 05:22 GMT
Updated with settings.

Settings -> General Settings -> Playback Settings -> Fade on Stop

Rewind on Fade = enable/disable (default - disable)
Rewind on Fade Amount = select rewind amount in seconds (default - 2 s)
Comment by Alexander Levin (fml2) - Tuesday, 07 October 2008, 21:03 GMT
Wouldn't it be better to derive the rewind amount from the fade in and fade out duration? E.g. as the sum? Then we'd need no additional settings and the goal would be achieved (which is: not to miss a thing when stopping and then starting playback).
Comment by Michael Chicoine (mc2739) - Tuesday, 07 October 2008, 23:17 GMT
That sounds like a good idea, but there is no setting for fade in / fade out duration, and my understanding is that the duration varies among the different targets.
Comment by Steve Bavin (pondlife) - Wednesday, 08 October 2008, 06:43 GMT
The rewind issue isn't related to fades, or pause on headphones, really. What I'd prefer to see is a setting for "Rewind on resume" - where any restart (or resume from pause), be it button or headphone controlled - includes an automatic rewind.
Comment by Alexander Levin (fml2) - Wednesday, 08 October 2008, 19:52 GMT
If I understand the original post correctly, the issue *is* related to fades. If you want a general 'rewind on resume' it'd be another feature. Or even better: we could have a setting 'Rewind on resume' with the possible values "Never", "On fade only", and "Always." The question about the rewind amount still remains. For the first two values there is a logical answer, but not for the third. But even for that we can just hard code something, e.g. one second.
Comment by Steve Bavin (pondlife) - Thursday, 09 October 2008, 06:32 GMT
Sorry, I was incorrect to say it wasn't related to fades. What I meant was it might be independent of fades (e.g. an audiobook user may want to auto-rewind by 30 seconds each time they resume, anyway).

I don't think there's a need to tie the config in with fades - a single option for length of "resume rewind" should be enough (0 by default). Then you can set that when you enable fades, and reset it when you disable fades (a .cfg file makes this sort of thing easy enough).
Comment by Alexander Levin (fml2) - Thursday, 09 October 2008, 07:39 GMT
Ok, but I still think that the option 'On fade only' could make sense -- if you want to not miss a second but also want to hear nothing twice. This is like "Show file extensions only if file filter is set to 'supported'". You could have the same effect by changing two options but the option is 'smart' so you can do it by changing just one.
Comment by Michael Chicoine (mc2739) - Friday, 10 October 2008, 00:24 GMT
I like the idea of "Rewind on resume". This would be better than the code duplication I have added with my patch. I also like the settings fml2 suggested, but should values for headphone detection also be added?
Comment by Douglas Valentine (Dwyloc) - Friday, 24 October 2008, 00:28 GMT
As someone who uses rockbox primarily to listen to audiobooks I think a "Rewind on Resume" option would be very useful.
Comment by sideral (sideral) - Monday, 15 November 2010, 16:21 GMT
I love this feature.

Unfortunately, the patch does not apply any more. I've attached an adapted patch that I forward ported to a recent SVN revision.
Comment by Rosso Maltese (asettico) - Monday, 15 November 2010, 17:40 GMT
I just removed the empty line added to the bottom of english.lang, because it prevents to patch it with further patches.