summaryrefslogtreecommitdiffstats
path: root/firmware/pcm_playback.c
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2005-07-11 18:47:47 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2005-07-11 18:47:47 +0000
commitfbd4088df8807a220090dbf9e9a2c10771e2954a (patch)
treed619f822f55a8c8ed2a9103cac65be10232dc6d4 /firmware/pcm_playback.c
parentb55aaba22f57cbfd7c24d2a3ab55207622e90675 (diff)
downloadrockbox-fbd4088df8807a220090dbf9e9a2c10771e2954a.tar.gz
rockbox-fbd4088df8807a220090dbf9e9a2c10771e2954a.zip
Replaced some yields with sleep(1) to save battery while paused or
playing files which doesn't require cpu boosting. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7103 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/pcm_playback.c')
-rw-r--r--firmware/pcm_playback.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/pcm_playback.c b/firmware/pcm_playback.c
index b582cf8c65..af8ce18af4 100644
--- a/firmware/pcm_playback.c
+++ b/firmware/pcm_playback.c
@@ -478,7 +478,7 @@ void pcm_flush_fillpos(void)
while (!pcm_play_add_chunk(&audiobuffer[audiobuffer_pos],
copy_n, pcm_event_handler)) {
pcm_boost(false);
- yield();
+ sleep(1);
/* This is a fatal error situation that should never happen. */
if (!pcm_playing) {
logf("pcm_flush_fillpos error");
@@ -588,7 +588,7 @@ void* pcm_request_buffer(long length, long *realsize)
while (audiobuffer_free < length + audiobuffer_fillpos
+ CHUNK_SIZE && !crossfade_active) {
pcm_boost(false);
- yield();
+ sleep(1);
}
if (crossfade_active) {