Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#11178 - Bookmarks can store optional tokens w/o breaking backward compatibility - Add pitch and timestretch

Attached to Project: Rockbox
Opened by Jeffrey Goode (Blue_Dude) - Tuesday, 06 April 2010, 03:33 GMT+2
Last edited by Jeffrey Goode (Blue_Dude) - Saturday, 10 April 2010, 23:18 GMT+2
Task Type Patches
Category Music playback
Status Closed
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version Release 3.4
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

Added capability to parse bookmarks that may contain optional tokens. Can also parse any version of bookmark so that backward compatibility is always maintained (mix and match at will).

As a demo (and to add as a permanent feature), this patch adds pitch and timestretch tokens to bookmarks and applies their settings when played back.
   bmark.patch (3.7 KiB)
 apps/bookmark.c |   48 ++++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 46 insertions(+), 2 deletions(-)

This task depends upon

Closed by  Jeffrey Goode (Blue_Dude)
Saturday, 10 April 2010, 23:18 GMT+2
Reason for closing:  Accepted
Additional comments about closing:  Committed in r25576
Comment by Jeffrey Goode (Blue_Dude) - Wednesday, 07 April 2010, 04:54 GMT+2
Synced to r25504. Retains new pitchscreen tokens, but eliminates deprecated token in old bookmark format.
   bmark2.patch (3.8 KiB)
 apps/bookmark.c |   54 +++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 49 insertions(+), 5 deletions(-)

Comment by Jeffrey Goode (Blue_Dude) - Thursday, 08 April 2010, 03:31 GMT+2
Removes all flags except for optional tokens. Cleaner code.
   bmark3.patch (5.9 KiB)
 apps/bookmark.c |   68 +++++++++++++++++++++++++++++++++++++++-----------------
 1 file changed, 48 insertions(+), 20 deletions(-)

Comment by Alexander Levin (fml2) - Thursday, 08 April 2010, 21:10 GMT+2
I have not tried out the patch (can't comple right now) but I don't like the cryptic names F_PIT_RAT and F_TIM_STR. We're not developing a CPU here! :-)
Comment by Jeffrey Goode (Blue_Dude) - Thursday, 08 April 2010, 21:23 GMT+2
The flag names are a holdover from a much larger list. I'll make them more human friendly.
Comment by Jeffrey Goode (Blue_Dude) - Thursday, 08 April 2010, 23:29 GMT+2
Friendlier tags. Pitch and speed are preset to 100% (not current values) when playing a bookmark and the bookmark doesn't have pitch and speed values.
   bmark4.patch (5.9 KiB)
 apps/bookmark.c |   68 +++++++++++++++++++++++++++++++++++++++-----------------
 1 file changed, 48 insertions(+), 20 deletions(-)

Comment by Alexander Levin (fml2) - Friday, 09 April 2010, 09:45 GMT+2
Why do I always read "TIMESTR" as "time string"? ;-)
Comment by Jeffrey Goode (Blue_Dude) - Saturday, 10 April 2010, 02:19 GMT+2
Code cleanup. "TIMESTR" is now "SPEED" ;-) Some variables renamed for clarity. Changed default behavior for legacy bookmarks back to *not* changing speed and pitch since that info is not specifically present. Changed the new bookmark format a bit: the id header string "bmark;" wasn't really needed; any non-digit would do. Now there's just a header character ">" to identify the new format.
   bmark5.patch (6.2 KiB)
 apps/bookmark.c |   72 ++++++++++++++++++++++++++++++++++++++------------------
 1 file changed, 50 insertions(+), 22 deletions(-)

Loading...