Rockbox mail archive
Subject: Re: cvs: apps settings.c,1.114,1.115 settings.h,1.69,1.70 settings_menu.c,1.97,1.98 wps.c,1.178,1.179
From: Magnus Holmgren (lear_at_algonet.se)
Date: 2003-02-16
- Next message: Justin Heiner: "More FM Findings"
- Previous message: Mike Holden: "Re: A bug in Fred's build of FM Rockbox"
- Next in thread: Brian King: "Re: cvs: apps settings.c,1.114,1.115 settings.h,1.69,1.70 settings_menu.c,1.97,1.98 wps.c,1.178,1.179"
- Reply: Brian King: "Re: cvs: apps settings.c,1.114,1.115 settings.h,1.69,1.70 settings_menu.c,1.97,1.98 wps.c,1.178,1.179"
- Reply: Brian King: "Re: cvs: apps settings.c,1.114,1.115 settings.h,1.69,1.70 settings_menu.c,1.97,1.98 wps.c,1.178,1.179"
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
[ attachment ]
Bjorn Stenberg wrote:
> + /* fade out */
> + int current_volume = global_settings.volume;
> +
> + while (current_volume > 20) {
> + current_volume -= 2;
> + sleep(1);
> + mpeg_sound_set(SOUND_VOLUME, current_volume);
> + }
> + mpeg_pause();
> + sleep(1); /* let mpeg thread run */
> +
> + /* reset volume to what it was before the fade */
> + mpeg_sound_set(SOUND_VOLUME, global_settings.volume);
The last sleep() in the fade out is too short, in my experience (using a
player). The volume is reset before the MPEG thread has stopped the
playback, so there's a brief burst of music at normal volume. I tried
using HZ/10 as sleep, and that seems to work fine. HZ/15 is slightly too
short.
--
Magnus Holmgren
- Next message: Justin Heiner: "More FM Findings"
- Previous message: Mike Holden: "Re: A bug in Fred's build of FM Rockbox"
- Next in thread: Brian King: "Re: cvs: apps settings.c,1.114,1.115 settings.h,1.69,1.70 settings_menu.c,1.97,1.98 wps.c,1.178,1.179"
- Reply: Brian King: "Re: cvs: apps settings.c,1.114,1.115 settings.h,1.69,1.70 settings_menu.c,1.97,1.98 wps.c,1.178,1.179"
- Reply: Brian King: "Re: cvs: apps settings.c,1.114,1.115 settings.h,1.69,1.70 settings_menu.c,1.97,1.98 wps.c,1.178,1.179"
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
[ attachment ]
Page was last modified "Jan 10 2012" The Rockbox Crew
|