On Tue, Sep 10, 2019 at 9:18 AM Takashi Iwai <tiwai@xxxxxxx> wrote: > > The value read from snd_pcm_status() should give the accurate pair of > the position and the timestamp. > Thanks. IIUC, if I call snd_pcm_status() in that mmap_commit method, get data between e.g. 10 seconds, and divide the increase of status._ptr https://github.com/michaelwu/alsa-lib/blob/afb2fbd0e554e42e51325c3197a176ea96a74203/include/sound/asound.h#L422 by increase of status.tstamp, I should get the the most precise available soundcard rate estimate referenced to system time. > You need to check the delay count as > well, which compensates the in-flight samples. > > I need just the rate at which the soundcard consumes/produces samples, I do not care about time at which the sound is being produced. I do not know exact meaning of the delay field. Is it involved in this calculation? Please is there any exact detailed description of the status fields? Thanks. Pavel. _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx https://mailman.alsa-project.org/mailman/listinfo/alsa-devel