Re: Loopback latency issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Maxim Doumkine <maxd@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/sox-users




[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux