summaryrefslogtreecommitdiffstats
path: root/apps/plugins/sdl
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2018-01-13 17:46:47 -0500
committerFranklin Wei <git@fwei.tk>2018-01-14 19:32:13 -0500
commit769d73d734938eb192794b4104986a527ac70dd5 (patch)
treea2e002a4380fa1f3e9692936bd4352236025985a /apps/plugins/sdl
parenta1123de28f8b02cf7a15569ccd76c8e5a82ccb98 (diff)
downloadrockbox-769d73d734938eb192794b4104986a527ac70dd5.tar.gz
rockbox-769d73d734938eb192794b4104986a527ac70dd5.tar.bz2
rockbox-769d73d734938eb192794b4104986a527ac70dd5.zip
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
Diffstat (limited to 'apps/plugins/sdl')
-rw-r--r--apps/plugins/sdl/src/audio/rockbox/SDL_rockboxaudio.c2
1 files changed, 1 insertions, 1 deletions
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);
}
}