1
0
Fork 0
forked from len0rd/rockbox

Boost the audio thread while it's filling the buffer. In the audio and the buffering threads, only cancel cpu boost when not filling.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16880 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Nicolas Pennequin 2008-03-29 17:28:30 +00:00
parent 3b46671a40
commit 732df386af
2 changed files with 8 additions and 3 deletions

View file

@ -1338,8 +1338,10 @@ void buffering_thread(void)
while (true)
{
cancel_cpu_boost();
queue_wait_w_tmo(&buffering_queue, &ev, filling?5:HZ/2);
if (!filling)
cancel_cpu_boost();
queue_wait_w_tmo(&buffering_queue, &ev, filling ? 5 : HZ/2);
switch (ev.id)
{

View file

@ -1848,6 +1848,7 @@ static void audio_fill_file_buffer(bool start_play, size_t offset)
bool continue_buffering;
filling = STATE_FILLING;
trigger_cpu_boost();
/* No need to rebuffer if there are track skips pending. */
if (ci.new_track != 0)
@ -2357,7 +2358,9 @@ static void audio_thread(void)
while (1)
{
cancel_cpu_boost();
if (filling != STATE_FILLING)
cancel_cpu_boost();
if (!pcmbuf_queue_scan(&ev))
queue_wait_w_tmo(&audio_queue, &ev, HZ/2);