mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
FS#10856 - Skip to previous track inconsistent when using cuesheet
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24191 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
f011fe2b5d
commit
8e8e2627b2
3 changed files with 16 additions and 4 deletions
|
@ -39,6 +39,7 @@
|
|||
#include "plugin.h"
|
||||
#include "playback.h"
|
||||
#include "cuesheet.h"
|
||||
#include "gui/wps.h"
|
||||
|
||||
#define CUE_DIR ROCKBOX_DIR "/cue"
|
||||
|
||||
|
@ -328,7 +329,18 @@ bool curr_cuesheet_skip(struct cuesheet *cue, int direction, unsigned long curr_
|
|||
else
|
||||
{
|
||||
if (!(direction <= 0 && track == 0))
|
||||
track += direction;
|
||||
{
|
||||
/* If skipping forward, skip to next cuesheet segment. If skipping
|
||||
backward before DEFAULT_SKIP_TRESH milliseconds have elapsed, skip
|
||||
to previous cuesheet segment. If skipping backward after
|
||||
DEFAULT_SKIP_TRESH seconds have elapsed, skip to the start of the
|
||||
current cuesheet segment */
|
||||
if (direction == 1 ||
|
||||
((curr_pos - cue->tracks[track].offset) < DEFAULT_SKIP_TRESH))
|
||||
{
|
||||
track += direction;
|
||||
}
|
||||
}
|
||||
|
||||
seek(cue->tracks[track].offset);
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue