aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/alsa.c')
-rw-r--r--Alc/alsa.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Alc/alsa.c b/Alc/alsa.c
index d33c87ce..b0b35305 100644
--- a/Alc/alsa.c
+++ b/Alc/alsa.c
@@ -228,6 +228,8 @@ static int xrun_recovery(snd_pcm_t *handle, int err)
if(err == -EINTR || err == -EPIPE || err == -ESTRPIPE)
{
err = psnd_pcm_recover(handle, err, 1);
+ if(err >= 0)
+ err = psnd_pcm_prepare(handle);
if(err < 0)
AL_PRINT("recover failed: %s\n", psnd_strerror(err));
}
@@ -365,6 +367,8 @@ static ALuint ALSANoMMapProc(ALvoid *ptr)
case -EPIPE:
case -EINTR:
ret = psnd_pcm_recover(data->pcmHandle, ret, 1);
+ if(ret >= 0)
+ psnd_pcm_prepare(data->pcmHandle);
break;
default:
if (ret >= 0)
@@ -414,6 +418,8 @@ static ALuint ALSANoMMapCaptureProc(ALvoid *ptr)
case -EPIPE:
case -EINTR:
avail = psnd_pcm_recover(data->pcmHandle, avail, 1);
+ if(avail >= 0)
+ psnd_pcm_prepare(data->pcmHandle);
break;
default:
if (avail >= 0 && data->doCapture)