winealsa: Fix capture overrun logging.

This commit is contained in:
Jörg Höhle 2012-01-25 22:53:21 +01:00 committed by Alexandre Julliard
parent 5f304e7000
commit c596ddffab
1 changed files with 4 additions and 0 deletions

View File

@ -2043,9 +2043,13 @@ static void alsa_read_data(ACImpl *This)
nread = snd_pcm_readi(This->pcm_handle,
This->local_buffer + pos * This->fmt->nBlockAlign, readable);
TRACE("read %ld from %u limit %lu\n", nread, This->held_frames + This->lcl_offs_frames, readable);
if(nread < 0){
int ret;
if(nread == -EAGAIN) /* no data yet */
return;
WARN("read failed, recovering: %ld (%s)\n", nread, snd_strerror(nread));
ret = snd_pcm_recover(This->pcm_handle, nread, 0);