[pulseaudio-discuss] Flushing other programs' streams

Julian Orth ju.orth at gmail.com
Fri Jun 24 03:01:14 UTC 2016


I have a program that automatically mutes/unmutes other programs'
streams. A problem I've encountered is that, after unmuting, a small
portion of the audio that was supposed to be muted is played.

I think this is related to buffering. Is there a way to work around
this problem? Ideally I would like to discard the buffers every time I
unmute a sink-input. I've considered using a timer that delays the
unmute action by the buffer length (as reported in the
pa_sink_input_info structure) but I'm afraid that might not work if
the other program flushes its buffer at the same time.

pacmd reports that the sink-input I'm dealing with has a latency of 1
second. I don't know how latency and buffering are related but maybe
this information makes a difference.


More information about the pulseaudio-discuss mailing list