[prev in list] [next in list] [prev in thread] [next in thread]
List: rockbox-cvs
Subject: jethead71: r29923 - in trunk/apps: . gui
From: mailer () svn ! rockbox ! org
Date: 2011-05-25 8:35:31
Message-ID: 201105250835.p4P8ZVM1004631 () giant ! haxx ! se
[Download RAW message or body]
Date: 2011-05-25 10:35:31 +0200 (Wed, 25 May 2011)
New Revision: 29923
Log Message:
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.
Modified:
trunk/apps/appevents.h
trunk/apps/gui/wps.c
trunk/apps/playback.c
Modified: trunk/apps/appevents.h
===================================================================
--- trunk/apps/appevents.h 2011-05-24 10:56:01 UTC (rev 29922)
+++ trunk/apps/appevents.h 2011-05-25 08:35:31 UTC (rev 29923)
@@ -31,11 +31,19 @@
/** Playback events **/
enum {
+ /* Playback is starting from a stopped state */
PLAYBACK_EVENT_START_PLAYBACK = (EVENT_CLASS_PLAYBACK|1),
+ /* Audio has begun buffering for decoding track (or is already completed) */
PLAYBACK_EVENT_TRACK_BUFFER,
+ /* Handles for current user track are ready (other than audio or codec) */
+ PLAYBACK_EVENT_CUR_TRACK_READY,
+ /* Current user track finished */
PLAYBACK_EVENT_TRACK_FINISH,
+ /* A new current user track has begun */
PLAYBACK_EVENT_TRACK_CHANGE,
+ /* A manual skip is about to be processed */
PLAYBACK_EVENT_TRACK_SKIP,
+ /* Next track medadata was just loaded */
PLAYBACK_EVENT_NEXTTRACKID3_AVAILABLE,
};
Modified: trunk/apps/gui/wps.c
===================================================================
--- trunk/apps/gui/wps.c 2011-05-24 10:56:01 UTC (rev 29922)
+++ trunk/apps/gui/wps.c 2011-05-25 08:35:31 UTC (rev 29923)
@@ -1203,6 +1203,11 @@
/* add the WPS track event callbacks */
add_event(PLAYBACK_EVENT_TRACK_CHANGE, false, track_changed_callback);
add_event(PLAYBACK_EVENT_NEXTTRACKID3_AVAILABLE, false, \
nextid3available_callback); +#if CONFIG_CODEC == SWCODEC
+ /* Use the same callback as ..._TRACK_CHANGE for when remaining handles have
+ finished */
+ add_event(PLAYBACK_EVENT_CUR_TRACK_READY, false, track_changed_callback);
+#endif
#ifdef AUDIO_FAST_SKIP_PREVIEW
add_event(PLAYBACK_EVENT_TRACK_SKIP, false, track_skip_callback);
#endif
Modified: trunk/apps/playback.c
===================================================================
--- trunk/apps/playback.c 2011-05-24 10:56:01 UTC (rev 29922)
+++ trunk/apps/playback.c 2011-05-25 08:35:31 UTC (rev 29923)
@@ -1716,6 +1716,17 @@
}
#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))
_______________________________________________
rockbox-cvs mailing list
rockbox-cvs@cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/rockbox-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic