[alsa-devel] What does snd_pcm_delay() actually return?

James Courtier-Dutton James at superbug.co.uk
Sat Jun 14 11:51:10 CEST 2008


Lennart Poettering wrote:
> 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);
>
>   

We would have to be careful. The current snd_pcm_delay() sorts out all 
the wrap around detection etc. for us.
Having the raw pointers would require the application to do the wrap 
around detection but the driver has extra information in order for it to 
detect wrap around.



More information about the Alsa-devel mailing list