summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2008-06-15 11:22:44 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2008-06-15 11:22:44 +0000
commit23bca7e400a9ca5ae26abdae30508485047a058c (patch)
tree7526bb89c50d947baad6e5f7d1055df4ab85487d /apps
parent3d30be85577b81489ff3231c1c8b639f132863a4 (diff)
downloadrockbox-23bca7e400a9ca5ae26abdae30508485047a058c.zip
rockbox-23bca7e400a9ca5ae26abdae30508485047a058c.tar.gz
rockbox-23bca7e400a9ca5ae26abdae30508485047a058c.tar.bz2
rockbox-23bca7e400a9ca5ae26abdae30508485047a058c.tar.xz
fix FS#5821 and FS#8449 - WPS isnt updated during fade, play status isnt changed to pause fast enough.
not sure if this is the best fix, wondering why fade() is handled by the wps code and not playback.... git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17723 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/gui/gwps-common.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c
index 0498b83..b90c216 100644
--- a/apps/gui/gwps-common.c
+++ b/apps/gui/gwps-common.c
@@ -82,12 +82,14 @@ static void gui_wps_statusbar_draw(struct gui_wps *wps, bool force)
#include "pcmbuf.h"
/* fades the volume */
+bool wps_fading_out = false;
void fade(bool fade_in)
{
int fp_global_vol = global_settings.volume << 8;
int fp_min_vol = sound_min(SOUND_VOLUME) << 8;
int fp_step = (fp_global_vol - fp_min_vol) / 30;
-
+ int i;
+ wps_fading_out = !fade_in;
if (fade_in) {
/* fade in */
int fp_volume = fp_min_vol;
@@ -101,6 +103,8 @@ void fade(bool fade_in)
while (fp_volume < fp_global_vol - fp_step) {
fp_volume += fp_step;
sound_set_volume(fp_volume >> 8);
+ FOR_NB_SCREENS(i)
+ gui_wps_refresh(&gui_wps[i], 0, WPS_REFRESH_NON_STATIC);
sleep(1);
}
sound_set_volume(global_settings.volume);
@@ -112,10 +116,12 @@ void fade(bool fade_in)
while (fp_volume > fp_min_vol + fp_step) {
fp_volume -= fp_step;
sound_set_volume(fp_volume >> 8);
+ FOR_NB_SCREENS(i)
+ gui_wps_refresh(&gui_wps[i], 0, WPS_REFRESH_NON_STATIC);
sleep(1);
}
audio_pause();
-
+ wps_fading_out = false;
#if CONFIG_CODEC != SWCODEC
#ifndef SIMULATOR
/* let audio thread run and wait for the mas to run out of data */
@@ -1139,7 +1145,8 @@ static char *get_token_value(struct gui_wps *gwps,
int mode = 1;
if (status == AUDIO_STATUS_PLAY)
mode = 2;
- if (status & AUDIO_STATUS_PAUSE && !status_get_ffmode())
+ if (wps_fading_out ||
+ (status & AUDIO_STATUS_PAUSE && !status_get_ffmode()))
mode = 3;
if (status_get_ffmode() == STATUS_FASTFORWARD)
mode = 4;