aboutsummaryrefslogtreecommitdiffstats
path: root/src/output_all.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-03-25 18:04:41 +0100
committerMax Kellermann <max@duempel.org>2009-03-25 18:04:41 +0100
commit3be1cdf8e0488a933371a6a45ced720d2aa67905 (patch)
tree7ad74a1150b56e544ed5fceb65184fd43f9b8578 /src/output_all.c
parent933fcf42326972c93dfa840ef06e2639e16cc43d (diff)
downloadmpd-3be1cdf8e0488a933371a6a45ced720d2aa67905.tar.gz
mpd-3be1cdf8e0488a933371a6a45ced720d2aa67905.tar.xz
mpd-3be1cdf8e0488a933371a6a45ced720d2aa67905.zip
output_all: synchronize playback with a notify object
Use audio_output_client_notify instead of g_usleep(1ms) in audio_output_all_wait() to synchronize with the output_thread. Signal the audio_output_client_notify object in ao_play().
Diffstat (limited to '')
-rw-r--r--src/output_all.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/output_all.c b/src/output_all.c
index 870d8aed3..23d46b5f4 100644
--- a/src/output_all.c
+++ b/src/output_all.c
@@ -414,8 +414,7 @@ audio_output_all_wait(unsigned threshold)
if (audio_output_all_check() < threshold)
return true;
- /* XXX synchronize in a better way */
- g_usleep(1000);
+ notify_wait(&audio_output_client_notify);
return audio_output_all_check() < threshold;
}