1
0
Fork 0
forked from len0rd/rockbox

Put back the line (accidentally?) removed on the last commit. That is

necessary to prevent playback stuttering when fast skipping tracks.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7285 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Miika Pekkarinen 2005-08-06 05:50:14 +00:00
parent 0812164ada
commit 095854b989

View file

@ -1283,6 +1283,7 @@ bool codec_request_next_track_callback(void)
if (tracks[track_ridx].filesize == 0) {
logf("Loading from disk...");
new_track = 0;
last_index = -1;
queue_post(&audio_queue, AUDIO_PLAY, 0);
return false;
}
@ -1303,6 +1304,7 @@ bool codec_request_next_track_callback(void)
/*+ (off_t)tracks[track_ridx].codecsize*/ > codecbuflen) {
logf("Loading from disk...");
new_track = 0;
last_index = -1;
queue_post(&audio_queue, AUDIO_PLAY, 0);
return false;
}
@ -1408,6 +1410,15 @@ void audio_thread(void)
queue_wait_w_tmo(&audio_queue, &ev, 0);
switch (ev.id) {
case AUDIO_PLAY:
/* Refuse to start playback if we are already playing
the requested track. This is needed because when skipping
tracks fast, AUDIO_PLAY commands will get queued with the
the same track and playback will stutter. */
if (last_index == playlist_get_display_index() && playing) {
logf("already playing req. track");
break ;
}
logf("starting...");
playing = true;
paused = false;