From d8cb05e31ea896e4b8272b2e931f5f927294cc34 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Fri, 8 Jul 2011 23:39:01 +0000 Subject: 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 --- apps/voice_thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps') 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) -- cgit v1.2.3