forked from len0rd/rockbox
Check the audio queue for new messages while filling the buffer with tracks. This cuts down the long wait for a skip (or any other action) while adding a large number of tracks to the buffer.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15309 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
c9389e4ee8
commit
14da611cd3
1 changed files with 7 additions and 0 deletions
|
@ -2616,6 +2616,13 @@ static void audio_fill_file_buffer(bool start_play, size_t offset)
|
|||
start_play = false;
|
||||
offset = 0;
|
||||
sleep(1);
|
||||
if (!queue_empty(&audio_queue)) {
|
||||
/* There's a message in the queue. break the loop to treat it,
|
||||
and go back to filling after that. */
|
||||
LOGFQUEUE("buffering > audio Q_AUDIO_FILL_BUFFER");
|
||||
queue_post(&audio_queue, Q_AUDIO_FILL_BUFFER, 0);
|
||||
break;
|
||||
}
|
||||
} while (continue_buffering);
|
||||
|
||||
if (!had_next_track && audio_next_track())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue