Calculated average playback latency

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

 



Hi there.

I am involved in maintaining the mythtv audio code.

Today one of our user complained that he couldn't get any audio out ,
even though everything was properly configured on his side.

By default, Myth uses mmap access ; unless we found out that the audio
device doesn't allow mmap (e.g. snd_pcm_hw_params_set_access(handle,
params, SND_PCM_ACCESS_MMAP_INTERLEAVED) errored)

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

It's not the first time we're having such issues, so 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...

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

I couldn't find obvious references on how to perform such task.

I find some references in program like mplayer or jack using
snd_pcm_status_get_trigger_tstamp

Would anyone be kind enough to point me to some documentation or
explain to me how I could calculate the average latency between the
time you start playback and the time sounds actually comes out.

Thank you in advance
Jean-Yves
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux