forked from len0rd/rockbox
Pause correctly while seeking.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6975 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
c520d69f68
commit
2724d0bb55
1 changed files with 19 additions and 2 deletions
|
|
@ -470,6 +470,12 @@ static bool rebuffer_and_seek(int newpos)
|
||||||
|
|
||||||
mutex_unlock(&mutex_bufferfill);
|
mutex_unlock(&mutex_bufferfill);
|
||||||
|
|
||||||
|
while (cur_ti->available == 0 && cur_ti->filerem > 0) {
|
||||||
|
yield();
|
||||||
|
if (ci.stop_codec)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1415,10 +1421,21 @@ void audio_prev(void)
|
||||||
|
|
||||||
void audio_ff_rewind(int newpos)
|
void audio_ff_rewind(int newpos)
|
||||||
{
|
{
|
||||||
|
int counter;
|
||||||
|
|
||||||
logf("rewind: %d", newpos);
|
logf("rewind: %d", newpos);
|
||||||
/* Does not work yet. */
|
/* Keep playback paused until seek is complete. */
|
||||||
if (playing)
|
if (playing) {
|
||||||
ci.seek_time = newpos+1;
|
ci.seek_time = newpos+1;
|
||||||
|
counter = 30;
|
||||||
|
pcm_flush_audio();
|
||||||
|
while (ci.seek_time) {
|
||||||
|
sleep(10);
|
||||||
|
if (counter-- == 0)
|
||||||
|
break ;
|
||||||
|
}
|
||||||
|
pcm_play_stop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void audio_flush_and_reload_tracks(void)
|
void audio_flush_and_reload_tracks(void)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue