[alsa-devel] Vanilla Blocked I/O probs
Takashi Iwai
tiwai at suse.de
Tue Apr 3 14:59:03 CEST 2007
At Tue, 03 Apr 2007 13:41:26 +0100,
Gordon Miller wrote:
>
> Hi, I am calling
>
> rc = snd_pcm_readi (handle, buffer, MAX_LEN)
>
> but rc is always 4 short of MAX_LEN (1020 instead of 1024). I thought
> that it would just block until MAX_LEN frames were available. This is
> really doing my head in, and any help would be appreciated.
It's no bug. The blocking read behavior doesn't guarantee you to get
the given size. It's defined so in POSIX.
Practially you should get the request size if it's actually aligned to
the period size, though...
Takashi
More information about the Alsa-devel
mailing list