[alsa-devel] Strange behaviour with varying frame sizes on read
m.galabant at googlemail.com
Wed Jul 29 11:13:05 CEST 2009
please consider the following:
Period size is 80 frames, buffer size is 320 frames.
For all 3 tests I have 240 frames ready to read.
snd_pcm_avail_update() confirms this.
Outcome of my tests:
1) I want to read 80 frames, and get 80 frames. - OK, this is really basic.
2) I want to read 81 frames, and get 80 frames. - FAIL.
3) I want to read 80 frames, and get 80 frames. Then I read 1 frame,
and get 1 frame. - HUH?
I've both tested snd_pcm_readi() and snd_pcm_mmap_readi() - both have
the same semantic.
Is there any explanation for this kind of illogical behaviour (I have
version 1.0.14, which might be a bit old, but still)?
I should be able to read rather arbitrary amounts from a software
buffer, don't I?
More information about the Alsa-devel