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
This commit is contained in:
parent
e74eb1cf69
commit
6eb6985ac1
|
@ -99,7 +99,7 @@ int audiofile_decode(Buffer * cb, AudioFormat * af, DecoderControl * dc)
|
||||||
else {
|
else {
|
||||||
while(cb->begin==cb->end && cb->wrap &&
|
while(cb->begin==cb->end && cb->wrap &&
|
||||||
!dc->stop && !dc->seek){
|
!dc->stop && !dc->seek){
|
||||||
usleep(1000);
|
usleep(10000);
|
||||||
}
|
}
|
||||||
if(dc->stop) break;
|
if(dc->stop) break;
|
||||||
else if(dc->seek) continue;
|
else if(dc->seek) continue;
|
||||||
|
|
|
@ -242,7 +242,7 @@ int decoderInit(PlayerControl * pc, Buffer * cb, AudioFormat *af,
|
||||||
dc->stop = 0;
|
dc->stop = 0;
|
||||||
}
|
}
|
||||||
else if(dc->seek) dc->start = 1;
|
else if(dc->seek) dc->start = 1;
|
||||||
else usleep(1000);
|
else usleep(10000);
|
||||||
}
|
}
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
|
@ -311,7 +311,7 @@ void decode() {
|
||||||
{
|
{
|
||||||
processDecodeInput();
|
processDecodeInput();
|
||||||
if(quit) return;
|
if(quit) return;
|
||||||
usleep(100);
|
usleep(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
while(!quit) {
|
while(!quit) {
|
||||||
|
@ -458,7 +458,7 @@ void decode() {
|
||||||
quit = 1;
|
quit = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else usleep(10);
|
else usleep(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
pc->totalPlayTime+= pc->elapsedTime-pc->beginTime; \
|
pc->totalPlayTime+= pc->elapsedTime-pc->beginTime; \
|
||||||
|
|
|
@ -181,7 +181,7 @@ int flacSendChunk(FlacData * data) {
|
||||||
while(data->cb->begin==data->cb->end && data->cb->wrap &&
|
while(data->cb->begin==data->cb->end && data->cb->wrap &&
|
||||||
!data->dc->stop && !data->dc->seek)
|
!data->dc->stop && !data->dc->seek)
|
||||||
{
|
{
|
||||||
usleep(1000);
|
usleep(10000);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(data->dc->stop) return -1;
|
if(data->dc->stop) return -1;
|
||||||
|
|
|
@ -397,7 +397,7 @@ int openMp3(char * file, mp3DecodeData * data) {
|
||||||
|
|
||||||
int mp3ChildSendData(mp3DecodeData * data, Buffer * cb, DecoderControl * dc) {
|
int mp3ChildSendData(mp3DecodeData * data, Buffer * cb, DecoderControl * dc) {
|
||||||
while(cb->begin==cb->end && cb->wrap && !dc->stop && !dc->seek)
|
while(cb->begin==cb->end && cb->wrap && !dc->stop && !dc->seek)
|
||||||
usleep(1000);
|
usleep(10000);
|
||||||
if(dc->stop) return -1;
|
if(dc->stop) return -1;
|
||||||
/* just for now, so it doesn't hang */
|
/* just for now, so it doesn't hang */
|
||||||
if(dc->seek) return 0;
|
if(dc->seek) return 0;
|
||||||
|
|
|
@ -85,7 +85,7 @@ int ogg_decode(Buffer * cb, AudioFormat * af, DecoderControl * dc)
|
||||||
while(cb->begin==cb->end && cb->wrap &&
|
while(cb->begin==cb->end && cb->wrap &&
|
||||||
!dc->stop && !dc->seek)
|
!dc->stop && !dc->seek)
|
||||||
{
|
{
|
||||||
usleep(1000);
|
usleep(10000);
|
||||||
}
|
}
|
||||||
if(dc->stop) break;
|
if(dc->stop) break;
|
||||||
else if(dc->seek) continue;
|
else if(dc->seek) continue;
|
||||||
|
|
|
@ -134,7 +134,7 @@ int playerInit() {
|
||||||
pc->queueLockState = PLAYER_QUEUE_UNLOCKED;
|
pc->queueLockState = PLAYER_QUEUE_UNLOCKED;
|
||||||
pc->unlockQueue = 0;
|
pc->unlockQueue = 0;
|
||||||
}
|
}
|
||||||
else usleep(1000);
|
else usleep(10000);
|
||||||
}
|
}
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
Loading…
Reference in New Issue