diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2017-11-24 07:55:56 -0500 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2017-11-24 08:55:49 -0500 |
commit | abef23608152a2839c34dcfc283d1561b3eadd45 (patch) | |
tree | eb03da5bfd7bc9ec7858e3fed123b93ece24df90 /apps/gui | |
parent | 75d2e1f35c0ec40f839687ed2d1a670b0da41a36 (diff) | |
download | rockbox-abef23608152a2839c34dcfc283d1561b3eadd45.tar.gz rockbox-abef23608152a2839c34dcfc283d1561b3eadd45.zip |
Do playback restarts the proper way
It isn't necessary to explicitly stop and restart playback to
force it to update something that must cause rebuffering.
Change-Id: I6ff5394fcafc7374af67ef9fbf9022bb4a79b773
Diffstat (limited to 'apps/gui')
-rw-r--r-- | apps/gui/skin_engine/skin_parser.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index 5409861cc7..dce88e9c58 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c | |||
@@ -2533,22 +2533,13 @@ bool skin_data_load(enum screen_type screen, struct wps_data *wps_data, | |||
2533 | } | 2533 | } |
2534 | #endif | 2534 | #endif |
2535 | #if defined(HAVE_ALBUMART) && !defined(__PCTOOL__) | 2535 | #if defined(HAVE_ALBUMART) && !defined(__PCTOOL__) |
2536 | int status = audio_status(); | 2536 | /* last_albumart_{width,height} is either both 0 or valid AA dimensions */ |
2537 | if (status & AUDIO_STATUS_PLAY) | 2537 | struct skin_albumart *aa = SKINOFFSETTOPTR(skin_buffer, wps_data->albumart); |
2538 | { | 2538 | if (aa && (aa->state != WPS_ALBUMART_NONE || |
2539 | /* last_albumart_{width,height} is either both 0 or valid AA dimensions */ | 2539 | (((wps_data->last_albumart_height != aa->height) || |
2540 | struct skin_albumart *aa = SKINOFFSETTOPTR(skin_buffer, wps_data->albumart); | 2540 | (wps_data->last_albumart_width != aa->width))))) |
2541 | if (aa && (aa->state != WPS_ALBUMART_NONE || | 2541 | { |
2542 | (((wps_data->last_albumart_height != aa->height) || | 2542 | playback_update_aa_dims(); |
2543 | (wps_data->last_albumart_width != aa->width))))) | ||
2544 | { | ||
2545 | struct mp3entry *id3 = audio_current_track(); | ||
2546 | unsigned long elapsed = id3->elapsed; | ||
2547 | unsigned long offset = id3->offset; | ||
2548 | audio_stop(); | ||
2549 | if (!(status & AUDIO_STATUS_PAUSE)) | ||
2550 | audio_play(elapsed, offset); | ||
2551 | } | ||
2552 | } | 2543 | } |
2553 | #endif | 2544 | #endif |
2554 | #ifndef __PCTOOL__ | 2545 | #ifndef __PCTOOL__ |