diff options
author | Max Kellermann <max@duempel.org> | 2008-09-26 07:12:29 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-26 07:12:29 +0200 |
commit | e2a12deead431f86c24d71579c954e00e73ed447 (patch) | |
tree | ef10aa00cbf8da29f2c0086e9ea6540c801af726 /src/output_control.h | |
parent | 05f66e04a413114103ca3a14f742b0430f6858e0 (diff) | |
download | mpd-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.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/output_control.h b/src/output_control.h index 92973f6c1..b83a67b2f 100644 --- a/src/output_control.h +++ b/src/output_control.h @@ -30,6 +30,15 @@ struct tag; int audio_output_init(struct audio_output *, ConfigParam * param); int audio_output_open(struct audio_output *audioOutput, const struct audio_format *audioFormat); + +/** + * Wakes up the audio output thread. This is part of a workaround for + * a deadlock bug, and should be removed as soon as the real cause is + * fixed. XXX + */ +void +audio_output_signal(struct audio_output *ao); + void audio_output_play(struct audio_output *audioOutput, const char *playChunk, size_t size); void audio_output_cancel(struct audio_output *audioOutput); |