aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/output_all.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/output_all.c b/src/output_all.c
index 166dbb430..fa2d741c2 100644
--- a/src/output_all.c
+++ b/src/output_all.c
@@ -149,6 +149,18 @@ static void audio_output_wait_all(void)
notify_wait(&audio_output_client_notify);
}
+/**
+ * Resets the "reopen" flag on all audio devices. MPD should
+ * immediately retry to open the device instead of waiting for the
+ * timeout when the user wants to start playback.
+ */
+static void
+audio_output_all_reset_reopen(void)
+{
+ for (unsigned i = 0; i < num_audio_outputs; ++i)
+ audio_outputs[i].reopen_after = 0;
+}
+
static void
audio_output_all_update(void)
{
@@ -216,6 +228,7 @@ audio_output_all_open(const struct audio_format *audio_format)
if (audio_format != NULL)
input_audio_format = *audio_format;
+ audio_output_all_reset_reopen();
audio_output_all_update();
for (i = 0; i < num_audio_outputs; ++i) {