<div dir="ltr">Hi, thanks for your help. I am using kernel 4.11.3 and alsalib 1.1.4 in Arch Linux. Your suggestion to use a filesink was helpful. I did not think about that. There is no crackling in the file. Gstreamer is ok.<div><br></div><div>After trying many reboots I observed that the crackling starts after the system has been on for some time.  I had ruled out hardware issues as changing soundcards did not solve the problem but after a careful look at the systemd logs I found out that my usb memory card reader was driving the kernel crazy periodically adding and removing storage devices that did not exist. As bizarre as it may sound removing the usb reader has taken away the crackling. I know that in other to notify the user gnome creates/removes sink inputs in pulseaudio whenever a storage device is added/removed. Maybe this was interfering  with pulseaudio in an unexpected way.</div><div><br></div><div>Thanks again for your time,</div><div><br></div><div>                     Wellington</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 9, 2017 at 1:41 PM, Nicolas Dufresne <span dir="ltr"><<a href="mailto:nicolas@ndufresne.ca" target="_blank">nicolas@ndufresne.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Le vendredi 09 juin 2017 à 12:45 -0300, wellington wallace a écrit :<br>
> Hi,<br>
><br>
> When running the command:<br>
><br>
> gst-launch-1.0 audiotestsrc freq=40 ! pulsesink<br>
<br>
</span>I also can't reproduce at 40. Cracking can be heard starting at freq=8<br>
and lower for me.<br>
<span class=""><br>
><br>
> I can hear the test signal but also lots of crackling. When using<br>
> higher frequencies(above 100Hz or 200Hz) I do not hear any crackling.<br>
> Replacing pulsesink with alsasink does not change the problem. Is<br>
> there a test I can do to know if this problem is in Gstreamer or<br>
> Pulseaudio?<br>
<br>
</span>Note that to really test against alsasink, you need to set the device<br>
property to avoid the default, which is likely going through pulseaudio<br>
on most system. On my Intel SoC, I use this to compare:<br>
<br>
  alsasink device=sysdefault:CARD=PCH<br>
<br>
Though, it makes no difference. I have done further test, I have<br>
recorder the test stream into a wav and use aplay to play it back.<br>
Result would show the same crackling. That least two option, the wave<br>
generator might be broken, or it's driver/alsa issue. The fact it's<br>
better for certain users might indicate that different version of the<br>
driver are handling this better (the generator code in GStreamer<br>
haven't changed for years).<br>
<br>
  gst-launch-1.0 -e audiotestsrc freq=8 is-live=1 ! wavenc ! filesink location=test.wav<br>
  aplay test.wav -D sysdefault:CARD=PCH<br>
<br>
Maybe you should share the kernel verison your are running this on. I'm<br>
running Fedora kernel 4.11.3 and AlsaLib version 1.1.1.<br>
<br>
regards,<br>
Nicolas<br>______________________________<wbr>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.<wbr>freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/gstreamer-<wbr>devel</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Prof.° Wellington Wallace Miguel Melo<br><br><div>CEFET/RJ Uned Nova Iguaçu<br><br></div></div></div>
</div>