dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Re: Fade on Power on/off

Re: Fade on Power on/off

From: BlueChip <>
Date: Tue, 15 Jun 2004 01:08:43 +0100

apps/main.c:app_main() -> apps/main.c:init() ->
apps/settings.c:settings_load() -> apps/settings.c:settings_apply()

near the top of that you will find

     mpeg_sound_set(SOUND_VOLUME, global_settings.volume);

replace that with a loop from i=mas_read(volume) to global_settings.volume
much the same way as you faded out.

Realise that you may find yourself fading IN or OUT at this point, as I
suspect it is NOT only called at power up, but probably on load config also.


At 22:22 14/06/04, you wrote:

>----- Original Message -----
>From: "Mark Bright" <>
>To: "'Rockbox development'" <>
>Sent: Monday, June 14, 2004 8:40 PM
>Subject: Fade on Power on/off
> > We already have a facility to enable fade on Pause / Stop / Start,
> >
> > What's the possibility of adding the same fade up/down functionality on
> > Power ON, Power OFF?
> > Preferably starting to fade out on OFF pressed rather than released - as
> > mentioned in a previous thread
> >
> > A simple
> > for(i=(mas_codec_readreg(0x10)>>8)&0xFF; i; i--)
> > mas_codec_writereg(0x10<<8, i);
> > sleep(HZ/10);
> >
> > In power_off() in power.c gives a nice fade out, but I can't see where to
> > the reverse for power ON.
> >
>this code will work only for sleep timer. pressing off for a long time shuts
>the unit off by hardware
>I don't think there is time to fade or do anything before the power is cut
>off, or rockbox will have to detect long off pressure before the power if
>shut down.
>My player does shut down in less than 1s (maybe half a second?) when I press
>stop. this is not enough.
> > So, does anyone else think this is a good idea, and can someone tell me
> > where to do the power on fade?
>it is in the 'resume' code don't you think?
>Actually there is a setting for resuming: yes, no, ask. maybe we could add
>'fade in'?
> > _______________________________________________
> >

Received on 2004-06-15

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy