From 1e0ceb3d881a89d360a72b373c0c0ffd6865ed43 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 29 Jan 2009 17:08:44 +0100 Subject: [PATCH] jack: clear "shutdown" flag on reconnect When the connection failed once, you had to restart MPD, because it never cleared the jack_data.shutdown flag. Instead, it refused to play anything "because there is no client thread" (which is wrong at that point). --- NEWS | 1 + src/output/jack_plugin.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/NEWS b/NEWS index f1b03f637..3a38f2a7a 100644 --- a/NEWS +++ b/NEWS @@ -36,6 +36,7 @@ ver 0.15 - (200?/??/??) ver 0.14.2 (2009/??/??) * audio outputs: - jack: allocate ring buffers before connecting + - jack: clear "shutdown" flag on reconnect ver 0.14.1 (2009/01/17) diff --git a/src/output/jack_plugin.c b/src/output/jack_plugin.c index d16eb0443..2e5d5d70f 100644 --- a/src/output/jack_plugin.c +++ b/src/output/jack_plugin.c @@ -220,6 +220,8 @@ mpd_jack_connect(struct jack_data *jd, struct audio_format *audio_format) jd->ringbuffer[0] = jack_ringbuffer_create(jd->ringbuffer_size); jd->ringbuffer[1] = jack_ringbuffer_create(jd->ringbuffer_size); + jd->shutdown = false; + if ((jd->client = jack_client_new(mpd_jack_name(jd))) == NULL) { g_warning("jack server not running?"); return -1;