From abef23608152a2839c34dcfc283d1561b3eadd45 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Fri, 24 Nov 2017 07:55:56 -0500 Subject: 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 --- apps/gui/skin_engine/skin_parser.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'apps/gui/skin_engine/skin_parser.c') 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, } #endif #if defined(HAVE_ALBUMART) && !defined(__PCTOOL__) - int status = audio_status(); - if (status & AUDIO_STATUS_PLAY) - { - /* last_albumart_{width,height} is either both 0 or valid AA dimensions */ - struct skin_albumart *aa = SKINOFFSETTOPTR(skin_buffer, wps_data->albumart); - if (aa && (aa->state != WPS_ALBUMART_NONE || - (((wps_data->last_albumart_height != aa->height) || - (wps_data->last_albumart_width != aa->width))))) - { - struct mp3entry *id3 = audio_current_track(); - unsigned long elapsed = id3->elapsed; - unsigned long offset = id3->offset; - audio_stop(); - if (!(status & AUDIO_STATUS_PAUSE)) - audio_play(elapsed, offset); - } + /* last_albumart_{width,height} is either both 0 or valid AA dimensions */ + struct skin_albumart *aa = SKINOFFSETTOPTR(skin_buffer, wps_data->albumart); + if (aa && (aa->state != WPS_ALBUMART_NONE || + (((wps_data->last_albumart_height != aa->height) || + (wps_data->last_albumart_width != aa->width))))) + { + playback_update_aa_dims(); } #endif #ifndef __PCTOOL__ -- cgit v1.2.3