I've been developing an application in python on the Raspberry Pi and trying to get 100% clean audio from a microphone. Various attempts using the Pyaudio and sounddevice modules give a variety of clicks and pops due to dropped samples. I have also tried spawning both arecord and ffmpeg as sub-processes and then using a named pipe to read the output into my app. These last two were more successful until I increased the number of other threads in the app when once again I started getting dropped samples....