summaryrefslogtreecommitdiff
path: root/apps/playback.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2011-05-25 08:35:31 +0000
committerMichael Sevakis <jethead71@rockbox.org>2011-05-25 08:35:31 +0000
commitcaf907eef137dea6e29468d3311ce8197217900f (patch)
tree1e2b818d93277d7809d7de973edbabe4646333fe /apps/playback.c
parent2e3162f039fdb4d48aa5c9a1bf6c11ac9439a514 (diff)
Workaround an occasional problem where album art or cuesheets might not be ready by the time the track change event is send which can result in the WPS not immediately being aware that the handles are ready. A better solution will be sought that hopefully doesn't require the additional event.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29923 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playback.c')
-rw-r--r--apps/playback.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 2fbc4a85a1..2775e8a95b 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -1716,6 +1716,17 @@ static int audio_finish_load_track(struct track_info *info)
}
#endif
+ /* All handles available to external routines are ready - audio and codec
+ information is private */
+
+ if (info == track_list_user_current(0))
+ {
+ /* Send only when the track handles could not all be opened ahead of
+ time for the user's current track - otherwise everything is ready
+ by the time PLAYBACK_EVENT_TRACK_CHANGE is sent */
+ send_event(PLAYBACK_EVENT_CUR_TRACK_READY, id3_get(PLAYING_ID3));
+ }
+
#ifdef HAVE_CODEC_BUFFERING
/* Try to buffer a codec for the track */
if (info != cur_info && !audio_buffer_codec(info, track_id3))