Commit 0ad56e0f authored by David Guibert's avatar David Guibert Committed by Max Kellermann

pulse_mixer: close

when the mixer is closed, - the mainloop is stopped. - the context is disconnected. - then the mainloop is freed. Signed-off-by: 's avatarDavid Guibert <david.guibert@gmail.com>
parent 91f33709
......@@ -236,7 +236,20 @@ pulse_mixer_open(G_GNUC_UNUSED struct mixer *data)
static void
pulse_mixer_close(G_GNUC_UNUSED struct mixer *data)
{
return;
struct pulse_mixer *pm=(struct pulse_mixer *) data;
if (pm->mainloop)
pa_threaded_mainloop_stop(pm->mainloop);
if (pm->context) {
pa_context_disconnect(pm->context);
pa_context_unref(pm->context);
pm->context = NULL;
}
if (pm->mainloop) {
pa_threaded_mainloop_free(pm->mainloop);
pm->mainloop = NULL;
}
}
static int
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment