Rockbox

Tasklist

FS#6044 - New Alarm Plugin

Attached to Project: Rockbox
Opened by Victor Rajewski (vik) - Friday, 22 September 2006, 09:08 GMT
Last edited by Alex Parker (BigBambi) - Saturday, 05 June 2010, 17:20 GMT
Task Type Patches
Category Plugins
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

This plugin provide alarm functionality for any player with a RTC. It cannot wake the player up from sleep, so the player must be on the whole time, and when the alarm ticks over, it starts playing music. This is useful if you connect it to external speakers and a power supply and leave it on overnight to get woken in the morning. It can ramp the volume up over a given time to wake you up more gently, and (will soon have) an adjustable snooze setting. Has only been tested on an iriver H300 at the moment, but the code should be relatively portable.

To use it, start playing the song or playlist that you want to wake up to, then start the plugin which will pause the song.

Loosely based on Ivo Burkart's alarm.c http://www.rockbox.org/tracker/2021
This task depends upon

Closed by  Alex Parker (BigBambi)
Saturday, 05 June 2010, 17:20 GMT
Reason for closing:  Out of Date
Additional comments about closing:  Rockbox now has an alarm
Comment by Rani Hod (RaeNye) - Friday, 22 September 2006, 09:40 GMT
The .patch file is empty...
Comment by Victor Rajewski (vik) - Friday, 22 September 2006, 09:57 GMT
Strange; attaching it again (well, updated a notch)
Comment by Billy (ipodfoo) - Wednesday, 27 September 2006, 20:15 GMT
Is this available as a '.rock' file?
Comment by Jon (ace214) - Tuesday, 10 October 2006, 17:25 GMT
this seems to conflict with other patches when compiling (ipod 5g, today's cvs). it works when it is the only patch. possible patches are julius's full screen logo, album art, bmp viewer/resize, scroll margins, button press for usb charge/disk, ipod brightness, mp4 metaparser, ipod piezo driver, pong patch, and 'the' folder sorting. dont have time to isolate by each one.

CC alarm.c
alarm.c:26: error: redefinition of typedef 'time_t'
/home/Jon/rockbox/firmware/include/time.h:24: error: previous declaration of 'ti
me_t' was here
make[2]: *** [/home/Jon/rockbox/5gbuild/apps/plugins/alarm.o] Error 1
Comment by Jonas Häggqvist (rasher) - Tuesday, 10 October 2006, 17:29 GMT
If it works when it's the only patch, there is no problem with the patch. Conflicting patches is a fact of life, and each individual author should definitely not be concerned about it.
Comment by Victor Rajewski (vik) - Wednesday, 21 February 2007, 09:02 GMT
It seems the conflict is in the definition of the time_t type. At the time of writing the patch, there was no time_t defined, so I defined it. If any other package defines it, and it conflicts, you could remove the definition in the patch and see if it works (it should as long as time_t is defined as a long int). Of you could put in a #ifndef in there too...
Comment by Daniel Dalton (ddalton) - Wednesday, 22 August 2007, 11:36 GMT
Hi,

I download the patch file and applied it. I didn't get the c file. I got a hunk error in sources and I fix that. But when compiling I get the following error:
alarm.c:26: error: redefinition of typedef 'time_t'
/home/daniel/rockbox/firmware/include/time.h:24: error: previous declaration of
'time_t' was here
alarm.c:65: error: conflicting types for 'format_time'
/home/daniel/rockbox/apps/misc.h:59: error: previous declaration of 'format_time
' was here
alarm.c:65: error: conflicting types for 'format_time'
/home/daniel/rockbox/apps/misc.h:59: error: previous declaration of 'format_time
' was here
alarm.c: In function `save_settings':
alarm.c:118: error: too many arguments to function
alarm.c: In function `alarm_options_menu':
alarm.c:303: error: elements of array `items' have incomplete type
alarm.c:304: warning: excess elements in struct initializer
alarm.c:304: warning: (near initialization for `items[0]')
alarm.c:304: warning: excess elements in struct initializer
alarm.c:304: warning: (near initialization for `items[0]')
alarm.c:305: warning: excess elements in struct initializer
alarm.c:305: warning: (near initialization for `items[1]')
alarm.c:305: warning: excess elements in struct initializer
alarm.c:305: warning: (near initialization for `items[1]')
alarm.c:306: warning: excess elements in struct initializer
alarm.c:306: warning: (near initialization for `items[2]')
alarm.c:306: warning: excess elements in struct initializer
alarm.c:306: warning: (near initialization for `items[2]')
alarm.c:307: warning: excess elements in struct initializer
alarm.c:307: warning: (near initialization for `items[3]')
alarm.c:307: warning: excess elements in struct initializer
alarm.c:307: warning: (near initialization for `items[3]')
alarm.c:308: warning: excess elements in struct initializer
alarm.c:308: warning: (near initialization for `items[4]')
alarm.c:308: warning: excess elements in struct initializer
alarm.c:308: warning: (near initialization for `items[4]')
alarm.c:303: error: storage size of 'items' isn't known
alarm.c:310: error: structure has no member named `menu_init'
alarm.c:311: error: structure has no member named `menu_run'
alarm.c:312: error: structure has no member named `menu_exit'
alarm.c:303: warning: unused variable `items'
alarm.c: In function `plugin_start':
alarm.c:363: warning: passing arg 2 of pointer to function makes pointer from in
teger without a cast

Also what should I do with the c file?
Could you please tell me how I can get this to work?

Thanks.
Comment by Daniel Dalton (ddalton) - Saturday, 22 September 2007, 12:58 GMT
There is now an alarm built into rockbox. It can even wake up the player.
Fs#7814
Allows it to work on the h300. So I am not sure this patche is needed any more.
Also I think this is a bit out of date.

Loading...