From 769d73d734938eb192794b4104986a527ac70dd5 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Sat, 13 Jan 2018 17:46:47 -0500 Subject: Use sleep(0) instead of yield() in SDL_WaitAudio This allows CPU load to drop below 100%, which is good for anything that scales frequency and voltage based on CPU load. Also conserves some energy by letting the core go idle if there aren't any available buffers. Change-Id: I9385ac9e030f97010b12eb825875a900463ab0ac --- apps/plugins/sdl/src/audio/rockbox/SDL_rockboxaudio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/plugins/sdl/src') diff --git a/apps/plugins/sdl/src/audio/rockbox/SDL_rockboxaudio.c b/apps/plugins/sdl/src/audio/rockbox/SDL_rockboxaudio.c index 05b6c55853..83bd0afb42 100644 --- a/apps/plugins/sdl/src/audio/rockbox/SDL_rockboxaudio.c +++ b/apps/plugins/sdl/src/audio/rockbox/SDL_rockboxaudio.c @@ -127,7 +127,7 @@ static void ROCKBOXAUD_WaitAudio(_THIS) } } - rb->yield(); + rb->sleep(0); } } -- cgit v1.2.3