alsa-project / alsa-lib

The Advanced Linux Sound Architecture (ALSA) - library
GNU Lesser General Public License v2.1
357 stars 176 forks source link

snd_pcm_readi(),return -11,Resource temporarily unavailable #259

Closed xukawendi closed 2 years ago

xukawendi commented 2 years ago

i called the function snd_pcm_readi() to capture pcm data, but the function returns -11,and the snd_strerror(-11) shows "Resource temporarily unavailable",How can I resolve this problem?

perexg commented 2 years ago

Error -11 is EAGAIN. It's standard linux error code for the non-blocking I/O. See man 3 read and look for EAGAIN / O_NONBLOCK comments.