summaryrefslogtreecommitdiffstats
path: root/apps/voice_thread.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2011-07-08 23:39:01 +0000
committerMichael Sevakis <jethead71@rockbox.org>2011-07-08 23:39:01 +0000
commitd8cb05e31ea896e4b8272b2e931f5f927294cc34 (patch)
tree8583c96678eb1f6d8172815e66de5a46d3cd6020 /apps/voice_thread.c
parentb2dbc2fe70af89ab3b583192dfd5e32b4e309cc4 (diff)
downloadrockbox-d8cb05e31ea896e4b8272b2e931f5f927294cc34.tar.gz
rockbox-d8cb05e31ea896e4b8272b2e931f5f927294cc34.tar.bz2
rockbox-d8cb05e31ea896e4b8272b2e931f5f927294cc34.zip
Voice doesn't have to consume 100% CPU while waiting for an output buffer to be available. Use 'sleep(0)' instead of 'yield()' while polling.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30132 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/voice_thread.c')
-rw-r--r--apps/voice_thread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/voice_thread.c b/apps/voice_thread.c
index 3318bbecb3..a3dc1e16ab 100644
--- a/apps/voice_thread.c
+++ b/apps/voice_thread.c
@@ -457,7 +457,7 @@ static void NORETURN_ATTR voice_thread(void)
if ((dest = (char *)voice_buf_get()) != NULL)
break;
- yield();
+ sleep(0);
}
voice_buf_commit(dsp_process(td.dsp, dest, td.src, td.count)