Re: Loopback latency issue

Måns Rullgård <[email protected]>
Newsgroups gmane.comp.audio.sox
Message-ID <[email protected]>
Maxim Doumkine <[email protected]> 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/sox-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.