Re: What does snd_pcm_delay() actually return?

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

 



On Fri, 13.06.08 17:55, Takashi Iwai (tiwai@xxxxxxx) wrote:

> What about just providing three pointers: curr_ptr, hw_ptr and
> appl_ptr?  curr_ptr corresponds to the point being played, and hw_ptr
> is the point where the data was already sent to h/w, and appl_ptr is
> the point where the data is filled by user.  The above definitions are
> all combinations of these pointers.

I could agree to that. However, to be useful it must be possible to
query those three pointers atomically. i.e. in a single call:

   typedef struct snd_ptr_info {
        snd_uframes_t curr_ptr;
        snd_uframes_t hw_ptr;
        snd_uframes_t appl_ptr;
   } snd_ptr_info_t;

   int snd_pcm_get_ptr_info(snd_pcm_t *pcm, snd_ptr_info_t *i);

> I really don't understand why we need to hide hw_ptr and appl_ptr in
> the current API.  To me, exposing these points is much more
> straightforward.

I think I could subscribe to that.

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4
_______________________________________________
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