diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-04-01 03:48:51 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-04-01 03:48:51 +0000 |
commit | 3ab984176452000cc845adfb4afc8808a404a3c6 (patch) | |
tree | e5445ca386114bae6100788b9ace544ae48409f9 /src/player.c | |
parent | 917af619da81e88fe3b10b54171935e093fb8821 (diff) | |
download | mpd-3ab984176452000cc845adfb4afc8808a404a3c6.tar.gz mpd-3ab984176452000cc845adfb4afc8808a404a3c6.tar.xz mpd-3ab984176452000cc845adfb4afc8808a404a3c6.zip |
use our own portable version of usleep using select()
git-svn-id: https://svn.musicpd.org/mpd/trunk@578 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/player.c')
-rw-r--r-- | src/player.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/player.c b/src/player.c index 138a54a49..e0628de6c 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(10000); + else my_usleep(10000); } exit(0); @@ -206,7 +206,7 @@ int playerPlay(FILE * fp, char * utf8file) { return -1; } - while(player_pid>0 && pc->play) usleep(1000); + while(player_pid>0 && pc->play) my_usleep(1000); return 0; } @@ -216,7 +216,7 @@ int playerStop(FILE * fp) { if(player_pid>0 && pc->state!=PLAYER_STATE_STOP) { pc->stop = 1; - while(player_pid>0 && pc->stop) usleep(1000); + while(player_pid>0 && pc->stop) my_usleep(1000); } pc->queueState = PLAYER_QUEUE_BLANK; @@ -242,7 +242,7 @@ int playerPause(FILE * fp) { if(player_pid>0 && pc->state!=PLAYER_STATE_STOP) { pc->pause = 1; - while(player_pid>0 && pc->pause) usleep(1000); + while(player_pid>0 && pc->pause) my_usleep(1000); } return 0; @@ -361,7 +361,7 @@ void playerQueueLock() { if(player_pid>0 && pc->queueLockState==PLAYER_QUEUE_UNLOCKED) { pc->lockQueue = 1; - while(player_pid>0 && pc->lockQueue) usleep(1000); + while(player_pid>0 && pc->lockQueue) my_usleep(1000); } } @@ -371,7 +371,7 @@ void playerQueueUnlock() { if(player_pid>0 && pc->queueLockState==PLAYER_QUEUE_LOCKED) { pc->unlockQueue = 1; - while(player_pid>0 && pc->unlockQueue) usleep(1000); + while(player_pid>0 && pc->unlockQueue) my_usleep(1000); } } @@ -403,7 +403,7 @@ int playerSeek(FILE * fp, char * utf8file, float time) { if(pc->error==PLAYER_ERROR_NOERROR) { pc->seekWhere = time; pc->seek = 1; - while(player_pid>0 && pc->seek) usleep(1000); + while(player_pid>0 && pc->seek) my_usleep(1000); } return 0; |