summaryrefslogtreecommitdiff
path: root/apps/playback.c
diff options
context:
space:
mode:
authorNicolas Pennequin <nicolas.pennequin@free.fr>2008-03-29 17:28:30 +0000
committerNicolas Pennequin <nicolas.pennequin@free.fr>2008-03-29 17:28:30 +0000
commit732df386af71dfcf3aa800c2fa2b29073dd94ee7 (patch)
treed32c1a7004445b54ef248b0ec088b0b62dda37e3 /apps/playback.c
parent3b46671a40f4338b7ace8cdb64cf716f73626f31 (diff)
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
Diffstat (limited to 'apps/playback.c')
-rw-r--r--apps/playback.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 053181891f..328f6fc87c 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -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);