Commit a6b1b84a authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

PulseAudio: set/clear mute flag if volume is zero/non-zero

parent 04c8b812
......@@ -281,11 +281,14 @@ static int VolumeSet(aout_instance_t *aout, audio_volume_t vol)
pa_threaded_mainloop_lock(mainloop);
op = pa_context_set_sink_input_volume(sys->context, idx, &cvolume, NULL, NULL);
if (likely(op != NULL))
pa_operation_unref(op);
op = pa_context_set_sink_input_mute(sys->context, idx, volume == PA_VOLUME_MUTED,
NULL, NULL);
if (likely(op != NULL))
pa_operation_unref(op);
pa_threaded_mainloop_unlock(mainloop);
if (unlikely(op == NULL))
return -1;
pa_operation_unref(op);
return 0;
}
......
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