Fix the problem of songs not advancing without client activity

The select() in the main event loop blocks now (saving us many
unnecessary wakeups).  This interacted badly with the threads
that were trying to wakeup the main task via
pthread_cond_signal() since the main task was not blocked
on a condition variable, but on select().

So now if we detect a need to wakeup the player, we write
to a pipe which select() is watching instead of blindly
calling pthread_cond_signal().

git-svn-id: https://svn.musicpd.org/mpd/trunk@7347 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Eric Wong
2008-04-12 09:46:11 +00:00
parent 804088f590
commit baf9b94ecf
8 changed files with 173 additions and 20 deletions

View File

@@ -32,6 +32,7 @@
#include "permission.h"
#include "ack.h"
#include "os_compat.h"
#include "main_notify.h"
static void playerCloseAudio(void);