null-sink: add an option that allows rewinds to be disabled
Hi! PulseEffects developer bothering you again :-)
Last year I asked if rewinds can cause noises when a null sink monitor is being recorded https://lists.freedesktop.org/archives/pulseaudio-discuss/2018-October/030548.html. This patch tries to improve this situation by allowing rewinds to be disabled in the null sink through a module option. What I am doing is forcing the path to goto do_nothing
inside the function process_rewind
when the option norewinds
is turned on. By default it is off so the current behavior of doing rewinds is preserved.
I know this isn't the kind of patch you were hoping for but properly fixing the current rewinds issues is beyond my current capabilities. I did some tests in my computer and forcing pa_sink_process_rewind(u->sink, 0)
is enough to make the noises caused by volume changes go away. This issue https://github.com/wwmm/pulseeffects/issues/350 that has plagued all PulseEffects users is solved by this patch.
Best regards, Wellington