aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/mixer/pulse_mixer.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/mixer/pulse_mixer.c b/src/mixer/pulse_mixer.c
index 5e4f294ba..5bb6061fe 100644
--- a/src/mixer/pulse_mixer.c
+++ b/src/mixer/pulse_mixer.c
@@ -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