<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="en-SE" link="#0563C1" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Thank you George,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Makes sense. I think I can live with this behavior.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Regards<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">/R<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="mso-fareast-language:#2000">From:</span></b><span lang="EN-US" style="mso-fareast-language:#2000"> Georg Chini <georg@chini.tk>
<br>
<b>Sent:</b> Thursday, 28 May 2020 09:03<br>
<b>To:</b> General PulseAudio Discussion <pulseaudio-discuss@lists.freedesktop.org>; Robert Bielik <Robert.Bielik@dirac.com><br>
<b>Subject:</b> Re: [pulseaudio-discuss] LADSPA plugin strange behavior<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On 27.05.20 12:12, Robert Bielik wrote:<span style="mso-fareast-language:#2000"><o:p></o:p></span></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span lang="EN-US">Oh, forgot to mention, I’m running pulseaudio 12.2 on a Raspberry Pi Model 3.</span><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="mso-fareast-language:#2000">From:</span></b><span lang="EN-US" style="mso-fareast-language:#2000"> pulseaudio-discuss
<a href="mailto:pulseaudio-discuss-bounces@lists.freedesktop.org"><pulseaudio-discuss-bounces@lists.freedesktop.org></a>
<b>On Behalf Of </b>Robert Bielik<br>
<b>Sent:</b> Wednesday, 27 May 2020 12:10<br>
<b>To:</b> <a href="mailto:pulseaudio-discuss@lists.freedesktop.org">pulseaudio-discuss@lists.freedesktop.org</a><br>
<b>Subject:</b> [pulseaudio-discuss] LADSPA plugin strange behavior</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Hi all,</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">New to the list. I’m setting up a system where I have a post-processing LADSPA plugin. I’ve setup /etc/pulse/default.pa to load my LADSPA plugin and to set it as the default sink.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Running pulseaudio with “pulseaudio 2>&1” I can see all the logs from my plugin, with it being properly initialized upon start of pulseaudio server, and deinitialized when shutting down the server.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">But, there is a strange behavior. Running one audio stream with aplay f.i., and then starting another one with paplay f.i., I can see that the pulseaudio server deactivates, and re-activates the plugin. This it does for
any stream started AND stopped.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Isn’t the stream to the plugin supposed to be continuous? Can the pulseaudio server be configured not to do this ?</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Regards</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">/Robert</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><span style="mso-fareast-language:#2000">This behavior is caused by rewinding. Basically, rewinding is used to ensure that<br>
a new stream is heard immediately. Consider a stream running with a large<br>
latency of let's say 500 ms. This means, that PA has already processed 500 ms<br>
more audio than has been played. When a new stream is added, it would normally<br>
take half a second before the new stream is audible. To avoid this, PA will roll back<br>
the latency of the old stream as far as possible and then add the new stream.<br>
<br>
For a filter this means, that it has to process audio that already passed through<br>
the filter. This can lead to distortions. In an ideal case, the filter would be able<br>
to rewind to the state which matches the point in time where the stream is picked<br>
up again. This is however not possible, so PA resets the filter in the hope that this<br>
has less impact than simply running the same audio through the filter again.<br>
<br>
For me, the concept of rewinding was difficult to understand, so I hope the explanation<br>
is understandable. The correct solution here is to avoid rewinding completely for<br>
the LADSPA sink and limit the latency to some small value. I have patches that do<br>
exactly that, but they depend on lots of other patches that are still not reviewed.<br>
<br>
For the moment I guess you have to live with that behavior (or you could patch the<br>
LADSPA sink not to reset the filter and see if this gives better results).<o:p></o:p></span></p>
</div>
The information in this email (including any attachments) may contain confidential and/or proprietary material. Any review, retransmission or use of this information by persons or entities other than the intended, authorized recipient is prohibited. If you
received this email in error, please notify the sender and delete the material. For information regarding how Dirac handles personal data, please visit https://www.dirac.com/privacy-policy.
</body>
</html>