diff options
author | Max Kellermann <max@duempel.org> | 2008-08-26 08:27:04 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-08-26 08:27:04 +0200 |
commit | 241cd043ca4f9dd560e6d947a9bf025f58de4ea9 (patch) | |
tree | d674656743e506ca5ae183638fdddc5f3c411dc8 /src/player.c | |
parent | 87beded44f0798c80744fcaebb06cac9ce8bbf39 (diff) | |
download | mpd-241cd043ca4f9dd560e6d947a9bf025f58de4ea9.tar.gz mpd-241cd043ca4f9dd560e6d947a9bf025f58de4ea9.tar.xz mpd-241cd043ca4f9dd560e6d947a9bf025f58de4ea9.zip |
invoke the notify API directly
Don't use wrappers like player_wakeup_decoder_nb(). These have been
wrappers calling notify.c functions, for compatibility with the
existing code when we migrated to notify.c.
Diffstat (limited to '')
-rw-r--r-- | src/player.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/player.c b/src/player.c index 61b380b84..e7ec926e4 100644 --- a/src/player.c +++ b/src/player.c @@ -27,22 +27,12 @@ static void playerCloseAudio(void); -void wakeup_player_nb(void) -{ - notify_signal(&pc.notify); -} - static void wakeup_player(void) { notify_signal(&pc.notify); wait_main_task(); } -void player_sleep(void) -{ - notify_wait(&pc.notify); -} - static void * player_task(mpd_unused void *arg) { notify_enter(&pc.notify); @@ -67,7 +57,7 @@ static void * player_task(mpd_unused void *arg) pc.queueLockState = PLAYER_QUEUE_UNLOCKED; pc.unlockQueue = 0; } else { - player_sleep(); + notify_wait(&pc.notify); continue; } /* we did something, tell the main task about it */ @@ -112,7 +102,7 @@ int playerPlay(int fd, Song * song) pc.play = 1; /* FIXME: _nb() variant is probably wrong here, and everywhere... */ - do { wakeup_player_nb(); } while (pc.play); + do { notify_signal(&pc.notify); } while (pc.play); return 0; } @@ -249,7 +239,7 @@ int getPlayerQueueState(void) void setQueueState(int queueState) { pc.queueState = queueState; - wakeup_player_nb(); + notify_signal(&pc.notify); } void playerQueueLock(void) @@ -285,7 +275,7 @@ int playerSeek(int fd, Song * song, float seek_time) pc.seekWhere = seek_time; pc.seek = 1; /* FIXME: _nb() is probably wrong here, too */ - do { wakeup_player_nb(); } while (pc.seek); + do { notify_signal(&pc.notify); } while (pc.seek); } return 0; |