title: Alsa: snd_pci_readi() recording
body: <p>I've got a dedicated thread that caputures audio from Alsa through <code>snd_pcm_readi()</code>. Recording happens fine for some 30 mins (each file of one minute duration), After that file size gradually decreases  and results in "<strong>read from audio interface failed  err = -32</strong>"</p>
  
  <pre><code>if ((err = snd_pcm_readi(capture_handle, buffer, buffer_frames)) != buffer_frames)
  
  {
  
          fprintf (stderr, "read from audio interface failed (%s)\n",err, snd_strerror (err));
              audio_outbuf_size = (err * snd_pcm_format_width(AUDIO_FORMAT)/ 8 * 2);
  }
  </code></pre>
  
  <p>Any helps are apperciated.
  Thank you.</p>