diff options
author | Chris Robinson <[email protected]> | 2010-01-06 23:02:28 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2010-01-06 23:02:28 -0800 |
commit | 82547db2db6276e2ce22eef4ce470b08a9714e16 (patch) | |
tree | 2d28a2447bfeec3c8b39636550b27f417d83dc18 | |
parent | 64ac3a4739ae2327a3a0ce9d40e53a9b661042e2 (diff) |
Prepare the pcm handle after recovering
-rw-r--r-- | Alc/alsa.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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) |