summaryrefslogtreecommitdiff
path: root/apps/gui
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2012-01-30 21:21:41 +0100
committerThomas Martitz <kugel@rockbox.org>2012-01-30 21:25:31 +0100
commit54044fd6e9739376cd0df28c26afea66f295a4d3 (patch)
treeec6a7ab2304563ec998511cd9cdf9598ec31cacc /apps/gui
parentd1b47c2eeb091d8d45fc73049998d68f33d9c5c0 (diff)
downloadrockbox-54044fd6e9739376cd0df28c26afea66f295a4d3.zip
rockbox-54044fd6e9739376cd0df28c26afea66f295a4d3.tar.gz
rockbox-54044fd6e9739376cd0df28c26afea66f295a4d3.tar.bz2
rockbox-54044fd6e9739376cd0df28c26afea66f295a4d3.tar.xz
Apply "Skip to outro" and specific skip lengths to individual tracks in a cuesheet.
Previously it applied to the whole file and you couldn't skip betweenn the subtracks. Now it behaves consistently with real seperated tracks. Change-Id: Ic1730ace142a05d9726b8c9afd67e94823651b60
Diffstat (limited to 'apps/gui')
-rw-r--r--apps/gui/wps.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/gui/wps.c b/apps/gui/wps.c
index b4ffe2a..39d71c8 100644
--- a/apps/gui/wps.c
+++ b/apps/gui/wps.c
@@ -546,10 +546,20 @@ static void next_track(void)
static void play_hop(int direction)
{
struct wps_state *state = skin_get_global_state();
+ struct cuesheet *cue = state->id3->cuesheet;
long step = global_settings.skip_length*1000;
long elapsed = state->id3->elapsed;
long remaining = state->id3->length - elapsed;
+ /* if cuesheet is active, then we want the current tracks end instead of
+ * the total end */
+ if (cue && (cue->curr_track_idx+1 < cue->track_count))
+ {
+ int next = cue->curr_track_idx+1;
+ struct cue_track_info *t = &cue->tracks[next];
+ remaining = t->offset - elapsed;
+ }
+
if (step < 0)
{
if (direction < 0)