[alsa-devel] how many processed frames? + various thoughts

Clemens Ladisch clemens at ladisch.de
Fri Oct 1 09:03:37 CEST 2010

John John wrote:
> Knowing the sample rate and the processed samples, I'm able to
> calculate the clock (what do you think about this approach?).

The sound card's clock will not be exactly synchronous with the
computer's clock.

> is there a good function into alsa API which returns the number of
> processed frames?

snd_pcm_writei() does return the number of processed frames.

snd_pcm_delay() returns the offset to the position of the sample that is
currently being played.


More information about the Alsa-devel mailing list