summaryrefslogtreecommitdiffstats
path: root/libao2/ao_pulse.c
diff options
context:
space:
mode:
Diffstat (limited to 'libao2/ao_pulse.c')
-rw-r--r--libao2/ao_pulse.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libao2/ao_pulse.c b/libao2/ao_pulse.c
index 66d28aa281..83270bbfcf 100644
--- a/libao2/ao_pulse.c
+++ b/libao2/ao_pulse.c
@@ -392,12 +392,15 @@ static int control(int cmd, void *arg) {
volume.values[1] = (pa_volume_t)vol->right*PA_VOLUME_NORM/100;
}
+ pa_threaded_mainloop_lock(mainloop);
if (!(o = pa_context_set_sink_input_volume(context, pa_stream_get_index(stream), &volume, NULL, NULL))) {
+ pa_threaded_mainloop_unlock(mainloop);
GENERIC_ERR_MSG(context, "pa_context_set_sink_input_volume() failed");
return CONTROL_ERROR;
}
/* We don't wait for completion here */
pa_operation_unref(o);
+ pa_threaded_mainloop_unlock(mainloop);
return CONTROL_OK;
}