On Thu, 2004-03-11 at 12:19, Jaroslav Kysela wrote:
> On Thu, 11 Mar 2004, Ove Kaaven wrote:
> 
> > ons, 10.03.2004 kl. 18.32 skrev Niels Christian ?rgaard:
> > > 
> > > The reason for me being so confused is that this occures at the call
> > > "snd_pcm_readi(snd_pcm_t *, void *, snd_pcm_uframes_t )", which for
> > > starters ain't mmap :)  I use "snd_pcm_delay(snd_pcm_t *,
> > > snd_pcm_sframes_t *)" to verify that there is sufficient data in the
> > > queue, before calling readi(),
> > 
> > Did you remember to call snd_pcm_avail_update() right before calling
> > readi()? The docs imply that snd_pcm_delay does not update the value
> > returned by the "snd_pcm_mmap_avail" in the assertion, but
> > snd_pcm_avail_update() does (by using the latest value from stuff like
> > snd_pcm_delay or IRQ handlers, so call it after snd_pcm_delay).
> 
> This call is required only for mmap access not for r/w access.
> 

I had tried using avail_update(), not finding anything telling me that
it was mmap-only. I stopped, as it would always return 0, and subsequent
readi()'s produced 0 samples.

/Nc

-- 
"An object is an object, not a pointer. However, objects are accessed
through a reference, which in implementation, is typically a pointer."

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to