[pulseaudio-discuss] new module module-plugin-sink

Alexander E. Patrakov patrakov at gmail.com
Sat May 4 14:42:50 UTC 2019

сб, 4 мая 2019 г. в 16:17, Georg Chini <georg at chini.tk>:
> Here is the new version of the header file, based on your feedback.
> The main changes are:
> - The create_filter() function now receives the channel maps for input
> and output.
> - The create_filter() function receives a kill_filter() function and a
> module pointer
>     which makes it possible for the filter to initiate unloading of the
> module if it
>     detects that it is no longer applicable.
> - An output_changed() function was added which communicates current sink
>    and port name to the filter, so that it can detect if the output has
> changed.
> Also I did a bit of cleanup and added a few more comments. Hope it looks
> better now.

It definitely looks better.

I am still confused about disable_rewind and max_latency. Let's
suppose that someone wants to implement a rewindable filter. In this
case, they need to keep history, because PulseAudio can ask the filter
to rewind some samples. And, as it is not allowed to say "no", they
must keep enough history to satisfy any possible rewind request. But
some upper bound must exist. Do I understand correctly that
max_latency serves as such upper bound?

Regarding the non-rewindable filters, we do need to limit the latency,
but I believe it is wrong for each individual filter to specify its
own value for such limit. It should be a global policy (the same value
for all non-rewindable sinks), and I don't see any reason for the
filter to be able to influence it.

Therefore, I believe these two fields can be replaced by one,
max_rewind, which is the size of history, in samples, that the filter
is willing to keep. Zero means a non-rewindable filter.

Alexander E. Patrakov

More information about the pulseaudio-discuss mailing list