Re: Latency

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

 



jon wrote:
> I am reading the latency like this :
>
> int get_playback_latency_ms()
> {
>         int framesleft;
>         int ms_in_buffer;
>         framesleft=snd_pcm_avail (playback_handle);                             // How many samples behind is the player
>
>         return( (framesleft*1000)/playback_sample_rate );                       // frames to milliseconds
> }
>
> If I increase the bufchunks value I seem to get larger latency

Yes.

> yet the latency values i'm reading always seem to be the same.

Apparently, your program fills the buffer fast enough so that there
are never too many frames available.  I'd guess that if your program
gets delayed more, by its own computations, by scheduling delays, or
by increasing the period time, you would see higher values.


Regards,
Clemens

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user




[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux