aboutsummaryrefslogtreecommitdiffstats
path: root/src/output_control.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-26 07:12:29 +0200
committerMax Kellermann <max@duempel.org>2008-09-26 07:12:29 +0200
commite2a12deead431f86c24d71579c954e00e73ed447 (patch)
treeef10aa00cbf8da29f2c0086e9ea6540c801af726 /src/output_control.c
parent05f66e04a413114103ca3a14f742b0430f6858e0 (diff)
downloadmpd-e2a12deead431f86c24d71579c954e00e73ed447.tar.gz
mpd-e2a12deead431f86c24d71579c954e00e73ed447.tar.xz
mpd-e2a12deead431f86c24d71579c954e00e73ed447.zip
audio_output: workaround for deadlock
During debugging, I found a deadlock between flushAudioBuffer() and the audio_output_task(): audio_output_task() didn't notice that there is a command, and flushAudioBuffer() waited forever in notify_wait(). I am not sure yet what is the real cause; work around this for now by waking up non-finished audio outputs in every iteration.
Diffstat (limited to '')
-rw-r--r--src/output_control.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/output_control.c b/src/output_control.c
index 3be1f6cd6..ac9394bd7 100644
--- a/src/output_control.c
+++ b/src/output_control.c
@@ -86,6 +86,12 @@ int audio_output_open(struct audio_output *audioOutput,
return ret;
}
+void
+audio_output_signal(struct audio_output *ao)
+{
+ notify_signal(&ao->notify);
+}
+
void audio_output_play(struct audio_output *audioOutput,
const char *playChunk, size_t size)
{