Re: How to keep track of the amount of queued samples?

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

 



Jan Deinhard wrote:
>I would like to understand the following quote which I copied from
>https://www.kernel.org/doc/Documentation/sound/alsa/timestamping.txt
>
>"The ALSA API provides two basic pieces of information, avail and delay,
>which combined with the trigger and current system timestamps allow for
>applications to keep track of the 'fullness' of the ring buffer and the
>amount of queued samples."

The trigger/current timestamps are not related to the buffer/queue.
They are useful only to relate the audio stream position to the
system time.

>What exactly is meant by "current system timestamp"? Is it provied by ALSA
>(htstamp?) or should I use clock_gettime(CLOCK_MONOTONIC,
>&system_time); to get that timestamp?

They are the same. ALSA returns it to prevent your process from being
interrupted between measuring the two clocks.


Regards,
Clemens

_______________________________________________
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