forked from len0rd/rockbox
Change when the new_track variable is reset to fix the track display during skipping
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9652 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
1d41f77b37
commit
2f11d60dcd
1 changed files with 5 additions and 2 deletions
|
|
@ -778,6 +778,7 @@ static void audio_check_new_track(bool require_codec)
|
||||||
{
|
{
|
||||||
int track_count = audio_track_count();
|
int track_count = audio_track_count();
|
||||||
int old_track_ridx = track_ridx;
|
int old_track_ridx = track_ridx;
|
||||||
|
bool forward;
|
||||||
|
|
||||||
/* If the playlist isn't that big */
|
/* If the playlist isn't that big */
|
||||||
if (!playlist_check(new_track))
|
if (!playlist_check(new_track))
|
||||||
|
|
@ -805,6 +806,9 @@ static void audio_check_new_track(bool require_codec)
|
||||||
else if (track_ridx < 0)
|
else if (track_ridx < 0)
|
||||||
track_ridx += MAX_TRACK;
|
track_ridx += MAX_TRACK;
|
||||||
|
|
||||||
|
forward = new_track > 0;
|
||||||
|
new_track = 0;
|
||||||
|
|
||||||
/* Save the old track */
|
/* Save the old track */
|
||||||
prev_ti = cur_ti;
|
prev_ti = cur_ti;
|
||||||
/* Move to the new track */
|
/* Move to the new track */
|
||||||
|
|
@ -819,7 +823,7 @@ static void audio_check_new_track(bool require_codec)
|
||||||
else if (cur_ti->filesize == 0 || !cur_ti->taginfo_ready)
|
else if (cur_ti->filesize == 0 || !cur_ti->taginfo_ready)
|
||||||
audio_rebuffer();
|
audio_rebuffer();
|
||||||
/* The track may be in memory, see if it really is */
|
/* The track may be in memory, see if it really is */
|
||||||
else if (new_track > 0)
|
else if (forward)
|
||||||
{
|
{
|
||||||
if (!buffer_wind_forward(require_codec, track_ridx, old_track_ridx))
|
if (!buffer_wind_forward(require_codec, track_ridx, old_track_ridx))
|
||||||
audio_rebuffer();
|
audio_rebuffer();
|
||||||
|
|
@ -861,7 +865,6 @@ static void audio_check_new_track(bool require_codec)
|
||||||
|
|
||||||
audio_update_trackinfo();
|
audio_update_trackinfo();
|
||||||
buffer_done:
|
buffer_done:
|
||||||
new_track = 0;
|
|
||||||
mutex_unlock(&mutex_interthread);
|
mutex_unlock(&mutex_interthread);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue