Rockbox

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

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#11056 - Alarm clock plugin

Attached to Project: Rockbox
Opened by Clément Pit--Claudel (CFP) - Wednesday, 24 February 2010, 18:58 GMT+2
Last edited by Rafaël Carré (funman) - Thursday, 25 February 2010, 15:45 GMT+2
Task Type Patches
Category Plugins
Status Closed
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

This patch adds an "alarmclock" plugin, which basically resumes playback at a given time. Think of it as a play timer, as opposed to the sleep timer.

I found it useful, provided that it is no problem for me to leave my player on overnight. Should work on most targets with an RTC (however the code has not been tested but on Gigabeat), and shouldn't break compilation anyway.

Does the same as  FS#6044 , but that one seemed pretty old (I should maybe search FS before coding patches though).

This is a very simple plugin, that would better be merged into the core, for targets which are not able to automatically wake up. I do not have, however, the required talent (or knowledge of the code) to do this.

CFP.

PS: While developing this plugin, I noticed that for a few seconds after booting the sim, the clock dosen't update.

(by the way, the reported version list in the tacker posting interface doesn't show v3.5)
   alarmclock.diff (4.9 KiB)
 apps/plugins/CATEGORIES   |    1 
 apps/plugins/SOURCES      |    1 
 apps/plugins/alarmclock.c |  140 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 142 insertions(+)

This task depends upon

Closed by  Rafaël Carré (funman)
Thursday, 25 February 2010, 15:45 GMT+2
Reason for closing:  Accepted
Additional comments about closing:  r24912
Comment by Clément Pit--Claudel (CFP) - Wednesday, 24 February 2010, 19:09 GMT+2
Woops
Comment by Clément Pit--Claudel (CFP) - Wednesday, 24 February 2010, 19:10 GMT+2
Wrong exit status (and I can't click the right button, it seems ; sorry).
   alarmclock.diff (4.9 KiB)
 apps/plugins/CATEGORIES   |    1 
 apps/plugins/SOURCES      |    1 
 apps/plugins/alarmclock.c |  140 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 142 insertions(+)

Comment by Clément Pit--Claudel (CFP) - Wednesday, 24 February 2010, 20:27 GMT+2
Update the diff to add the rockbox header, and a manual section (which does need proofreading though).

One bug remains (as discussed on IRC): when starting the plugin, if no playlist control file has ever been created, an error message is displayed (error accessing playlist control file). Since the audio resume code was actually taken from the playback menu in plugin lib, this bug happens in every plugin: for example, try to start codebuster on a clean sim build, and resume the audio playback from the playback menu.

I believe this doesn't need fixing, provided that the error message is very neat.
   alarmclock.diff (8.6 KiB)
 apps/plugins/CATEGORIES       |    1 
 apps/plugins/SOURCES          |    1 
 apps/plugins/alarmclock.c     |  161 ++++++++++++++++++++++++++++++++++++++++++
 manual/plugins/alarmclock.tex |   48 ++++++++++++
 manual/plugins/main.tex       |    2 
 5 files changed, 213 insertions(+)

Comment by Clément Pit--Claudel (CFP) - Wednesday, 24 February 2010, 20:55 GMT+2
Update the patch as per funman's comments.
   alarmclock.diff (8.7 KiB)
 apps/plugins/CATEGORIES       |    1 
 apps/plugins/SOURCES          |    1 
 apps/plugins/alarmclock.c     |  164 ++++++++++++++++++++++++++++++++++++++++++
 manual/plugins/alarmclock.tex |   48 ++++++++++++
 manual/plugins/main.tex       |    2 
 5 files changed, 216 insertions(+)

Comment by Clément Pit--Claudel (CFP) - Wednesday, 24 February 2010, 21:00 GMT+2
After discussion on IRC, the "bug" is actually the desired behavior :)
CFP.
Comment by Clément Pit--Claudel (CFP) - Wednesday, 24 February 2010, 21:02 GMT+2
Tested on most sims, seems ok.
CFP.

Loading...