jack: close JACK client on stop
When MPD stops playback, close the JACK client connection.
This commit is contained in:
parent
e68924435a
commit
e959c8e084
@ -88,8 +88,6 @@ mpd_jack_free(struct jack_data *jd)
|
|||||||
{
|
{
|
||||||
assert(jd != NULL);
|
assert(jd != NULL);
|
||||||
|
|
||||||
mpd_jack_client_free(jd);
|
|
||||||
|
|
||||||
for (unsigned i = 0; i < G_N_ELEMENTS(jd->output_ports); ++i)
|
for (unsigned i = 0; i < G_N_ELEMENTS(jd->output_ports); ++i)
|
||||||
g_free(jd->output_ports[i]);
|
g_free(jd->output_ports[i]);
|
||||||
|
|
||||||
@ -286,7 +284,7 @@ mpd_jack_open(void *data, struct audio_format *audio_format)
|
|||||||
|
|
||||||
assert(jd != NULL);
|
assert(jd != NULL);
|
||||||
|
|
||||||
if (jd->client == NULL && !mpd_jack_connect(jd, audio_format)) {
|
if (!mpd_jack_connect(jd, audio_format)) {
|
||||||
mpd_jack_client_free(jd);
|
mpd_jack_client_free(jd);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -299,7 +297,9 @@ mpd_jack_open(void *data, struct audio_format *audio_format)
|
|||||||
static void
|
static void
|
||||||
mpd_jack_close(G_GNUC_UNUSED void *data)
|
mpd_jack_close(G_GNUC_UNUSED void *data)
|
||||||
{
|
{
|
||||||
/*mpd_jack_finish(audioOutput);*/
|
struct jack_data *jd = data;
|
||||||
|
|
||||||
|
mpd_jack_client_free(jd);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user