diff options
author | Thomas Martitz <kugel@rockbox.org> | 2012-01-30 21:21:41 +0100 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2012-01-30 21:25:31 +0100 |
commit | 54044fd6e9739376cd0df28c26afea66f295a4d3 (patch) | |
tree | ec6a7ab2304563ec998511cd9cdf9598ec31cacc | |
parent | d1b47c2eeb091d8d45fc73049998d68f33d9c5c0 (diff) | |
download | rockbox-54044fd6e9739376cd0df28c26afea66f295a4d3.tar.gz rockbox-54044fd6e9739376cd0df28c26afea66f295a4d3.zip |
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
-rw-r--r-- | apps/gui/wps.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/gui/wps.c b/apps/gui/wps.c index b4ffe2a88b..39d71c8464 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c | |||
@@ -546,10 +546,20 @@ static void next_track(void) | |||
546 | static void play_hop(int direction) | 546 | static void play_hop(int direction) |
547 | { | 547 | { |
548 | struct wps_state *state = skin_get_global_state(); | 548 | struct wps_state *state = skin_get_global_state(); |
549 | struct cuesheet *cue = state->id3->cuesheet; | ||
549 | long step = global_settings.skip_length*1000; | 550 | long step = global_settings.skip_length*1000; |
550 | long elapsed = state->id3->elapsed; | 551 | long elapsed = state->id3->elapsed; |
551 | long remaining = state->id3->length - elapsed; | 552 | long remaining = state->id3->length - elapsed; |
552 | 553 | ||
554 | /* if cuesheet is active, then we want the current tracks end instead of | ||
555 | * the total end */ | ||
556 | if (cue && (cue->curr_track_idx+1 < cue->track_count)) | ||
557 | { | ||
558 | int next = cue->curr_track_idx+1; | ||
559 | struct cue_track_info *t = &cue->tracks[next]; | ||
560 | remaining = t->offset - elapsed; | ||
561 | } | ||
562 | |||
553 | if (step < 0) | 563 | if (step < 0) |
554 | { | 564 | { |
555 | if (direction < 0) | 565 | if (direction < 0) |