[alsa-devel] Calculated average playback latency

Clemens Ladisch clemens at ladisch.de
Tue Dec 14 17:20:47 CET 2010


Jean-Yves Avenard wrote:
> By default, Myth uses mmap access

Why?

> Problem, turned out his was using a USB audio device, and
> snd_pcm_hw_params_set_access didn't return any error.

USB audio devices do support mmap.

> ... I decided to stop using mmap and instead use snd_pcm_writei.
> 
> Now on my system, this has added quite a bit of latency and the A/V
> sync isn't perfect anymore...

Using mmap neither reduces latency, nor does it improve synchronization.

> Is there an official way to calculate an average system latency
> (doesn't need to be perfectly accurate).

Not the average, but try snd_pcm_delay().


Regards,
Clemens


More information about the Alsa-devel mailing list