diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-03-06 23:25:32 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-03-06 23:25:32 +0000 |
commit | 6eb6985ac1089b354e019f5cf8e16414855efaac (patch) | |
tree | fb4c84b76aae7fe3e14b461ce841a3eb82fdf931 | |
parent | e74eb1cf699fca5079e3a7f6c4a428c8372e83f6 (diff) |
make some usleeps longer, just to try to stave off busy waiting
git-svn-id: https://svn.musicpd.org/mpd/trunk@219 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-rw-r--r-- | src/audiofile_decode.c | 2 | ||||
-rw-r--r-- | src/decode.c | 6 | ||||
-rw-r--r-- | src/flac_decode.c | 2 | ||||
-rw-r--r-- | src/mp3_decode.c | 2 | ||||
-rw-r--r-- | src/ogg_decode.c | 2 | ||||
-rw-r--r-- | src/player.c | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/src/audiofile_decode.c b/src/audiofile_decode.c index c6c04dafd..7c44cdce8 100644 --- a/src/audiofile_decode.c +++ b/src/audiofile_decode.c @@ -99,7 +99,7 @@ int audiofile_decode(Buffer * cb, AudioFormat * af, DecoderControl * dc) else { while(cb->begin==cb->end && cb->wrap && !dc->stop && !dc->seek){ - usleep(1000); + usleep(10000); } if(dc->stop) break; else if(dc->seek) continue; diff --git a/src/decode.c b/src/decode.c index ce2629f5f..6b0a2c71e 100644 --- a/src/decode.c +++ b/src/decode.c @@ -242,7 +242,7 @@ int decoderInit(PlayerControl * pc, Buffer * cb, AudioFormat *af, dc->stop = 0; } else if(dc->seek) dc->start = 1; - else usleep(1000); + else usleep(10000); } exit(0); @@ -311,7 +311,7 @@ void decode() { { processDecodeInput(); if(quit) return; - usleep(100); + usleep(1000); } while(!quit) { @@ -458,7 +458,7 @@ void decode() { quit = 1; break; } - else usleep(10); + else usleep(1000); } pc->totalPlayTime+= pc->elapsedTime-pc->beginTime; \ diff --git a/src/flac_decode.c b/src/flac_decode.c index fd4969073..d60ae636f 100644 --- a/src/flac_decode.c +++ b/src/flac_decode.c @@ -181,7 +181,7 @@ int flacSendChunk(FlacData * data) { while(data->cb->begin==data->cb->end && data->cb->wrap && !data->dc->stop && !data->dc->seek) { - usleep(1000); + usleep(10000); } if(data->dc->stop) return -1; diff --git a/src/mp3_decode.c b/src/mp3_decode.c index 58a1ab548..5898d074d 100644 --- a/src/mp3_decode.c +++ b/src/mp3_decode.c @@ -397,7 +397,7 @@ int openMp3(char * file, mp3DecodeData * data) { int mp3ChildSendData(mp3DecodeData * data, Buffer * cb, DecoderControl * dc) { while(cb->begin==cb->end && cb->wrap && !dc->stop && !dc->seek) - usleep(1000); + usleep(10000); if(dc->stop) return -1; /* just for now, so it doesn't hang */ if(dc->seek) return 0; diff --git a/src/ogg_decode.c b/src/ogg_decode.c index c9cf0016c..aa8259f09 100644 --- a/src/ogg_decode.c +++ b/src/ogg_decode.c @@ -85,7 +85,7 @@ int ogg_decode(Buffer * cb, AudioFormat * af, DecoderControl * dc) while(cb->begin==cb->end && cb->wrap && !dc->stop && !dc->seek) { - usleep(1000); + usleep(10000); } if(dc->stop) break; else if(dc->seek) continue; diff --git a/src/player.c b/src/player.c index e2212ae30..3a9f455d0 100644 --- a/src/player.c +++ b/src/player.c @@ -134,7 +134,7 @@ int playerInit() { pc->queueLockState = PLAYER_QUEUE_UNLOCKED; pc->unlockQueue = 0; } - else usleep(1000); + else usleep(10000); } exit(0); |