aboutsummaryrefslogtreecommitdiffstats
path: root/src/output_all.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-03-26 23:40:50 +0100
committerMax Kellermann <max@duempel.org>2009-03-26 23:40:50 +0100
commit207786ffb1d6eba4f40daf981dbeb45745459425 (patch)
treeb46d7358d7a349a73ee292e231fd320ccf1047ad /src/output_all.c
parented4837662ad0ff969024cea1c906d5c9f245d8b6 (diff)
downloadmpd-207786ffb1d6eba4f40daf981dbeb45745459425.tar.gz
mpd-207786ffb1d6eba4f40daf981dbeb45745459425.tar.xz
mpd-207786ffb1d6eba4f40daf981dbeb45745459425.zip
output_all: synchronize playback with player_control.notify
This patch fixes a longer delay when moving around songs in the playlist. The main thread wants to enqueue a new "next" song into the player thread, but the player thread is waiting inside audio_output_all_wait() for the output threads. Use player_control.notify there, so audio_output_all_wait() gets woken up by the main thread, too.
Diffstat (limited to '')
-rw-r--r--src/output_all.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/output_all.c b/src/output_all.c
index 23d46b5f4..0cf0e924b 100644
--- a/src/output_all.c
+++ b/src/output_all.c
@@ -24,6 +24,7 @@
#include "conf.h"
#include "pipe.h"
#include "buffer.h"
+#include "player_control.h"
#ifndef NDEBUG
#include "chunk.h"
@@ -414,7 +415,7 @@ audio_output_all_wait(unsigned threshold)
if (audio_output_all_check() < threshold)
return true;
- notify_wait(&audio_output_client_notify);
+ notify_wait(&pc.notify);
return audio_output_all_check() < threshold;
}