I wonder if it's because the virtual pc doesn't have the same amount of processes running on it, nor physical data traffic, that your actual workstation has to deal with. Added to that, the memory available to it - not being used elsewhere - would improve perfoemance. Just my thinking. On Sat, 11 Jul 2020, 14:31 Måns Rullgård, wrote: > Maxim Doumkine writes: > > > Hello everyone, > > > > We are trying to build a Sox based real-time sound altering app, and > we’ve > > got everything working on our LUbuntu 16.04 stations except for an issue > w > > latency. > > > > When we test it on actual hardware, we are having a latency of about 2 > > seconds, when we test it on our virtual machine the latency is more like > > 250ms. > > > > sox -t pusleaudio default -t pulseaudio null pitch n > > Whenever we add the null loopback or aloop, we experience a delay. No > amount > > of config tinkering seems to affect this latency on an actual > workstation. > > The first thing I'd do is get rid of pulseaudio and access the ALSA > device directly. Even then, however, there are several places where > latency is added. You can find the ALSA buffer sizes currently uses by > examining /proc/asound/card0/pcm0p/sub0/hw_params (or whatever numbers > your system uses). The size (in bytes) of the main buffer in SoX is set > with the --buffer option. Some effects have additional internal buffers. > > -- > Måns Rullgård > > > _______________________________________________ > Sox-users mailing list > Sox-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/sox-users >