summaryrefslogtreecommitdiff
path: root/apps/gui/gwps-common.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2009-07-20 05:18:18 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2009-07-20 05:18:18 +0000
commit24b136f62de82d7419751b6aaeae0ad3d8497bea (patch)
treeb9bcfd07ca26f3da2f0ce500fc39e0719b3cbb8a /apps/gui/gwps-common.c
parent4c4fb82d9c112ccbcc4c94a7d85fe82d09801844 (diff)
downloadrockbox-24b136f62de82d7419751b6aaeae0ad3d8497bea.tar.gz
rockbox-24b136f62de82d7419751b6aaeae0ad3d8497bea.zip
rework cuesheet support:
swcodec: search for a .cue during buffering (with the possibility of adding embedded cuesheets later) hwcodec: search for a .cue when the id3 info for the current track is requested for the first time (disk should be spining so non issue) major beenfit from this is simplofy cuesheet handling code a bit... if mp3entry.cuesheet != NULL then there is a valid cuesheet.. no need to worry about if its enabled and preloaded. There is the possibility of putting the next/prev subtrack handling inside the playback code (as well as the id3 updating stuff (see FS#9789 for more info), but thats probably not a good idea. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21978 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/gwps-common.c')
-rw-r--r--apps/gui/gwps-common.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c
index c0923a9ab5..dd6ac02d85 100644
--- a/apps/gui/gwps-common.c
+++ b/apps/gui/gwps-common.c
@@ -355,18 +355,8 @@ bool gui_wps_update(struct gui_wps *gwps)
355{ 355{
356 struct mp3entry *id3 = gwps->state->id3; 356 struct mp3entry *id3 = gwps->state->id3;
357 bool retval; 357 bool retval;
358 if (cuesheet_is_enabled() && id3->cuesheet_type 358 gwps->state->do_full_update = gwps->state->do_full_update ||
359 && (id3->elapsed < curr_cue->curr_track->offset 359 cuesheet_subtrack_changed(id3);
360 || (curr_cue->curr_track_idx < curr_cue->track_count - 1
361 && id3->elapsed >= (curr_cue->curr_track+1)->offset)))
362 {
363 /* We've changed tracks within the cuesheet :
364 we need to update the ID3 info and refresh the WPS */
365 gwps->state->do_full_update = true;
366 cue_find_current_track(curr_cue, id3->elapsed);
367 cue_spoof_id3(curr_cue, id3);
368 }
369
370 retval = gui_wps_redraw(gwps, 0, 360 retval = gui_wps_redraw(gwps, 0,
371 gwps->state->do_full_update ? 361 gwps->state->do_full_update ?
372 WPS_REFRESH_ALL : WPS_REFRESH_NON_STATIC); 362 WPS_REFRESH_ALL : WPS_REFRESH_NON_STATIC);
@@ -421,7 +411,7 @@ static void draw_progressbar(struct gui_wps *gwps,
421 pb->x, pb->x + pb->width, y, pb->height); 411 pb->x, pb->x + pb->width, y, pb->height);
422#endif 412#endif
423 413
424 if ( cuesheet_is_enabled() && state->id3->cuesheet_type ) 414 if (state->id3->cuesheet)
425 cue_draw_markers(display, state->id3->length, 415 cue_draw_markers(display, state->id3->length,
426 pb->x, pb->x + pb->width, y+1, pb->height-2); 416 pb->x, pb->x + pb->width, y+1, pb->height-2);
427} 417}