aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
Diffstat (limited to 'Alc')
-rw-r--r--Alc/alsa.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/Alc/alsa.c b/Alc/alsa.c
index 19bda047..79092675 100644
--- a/Alc/alsa.c
+++ b/Alc/alsa.c
@@ -173,6 +173,19 @@ static ALuint ALSAProc(ALvoid *ptr)
// make sure there's frames to process
if(avail == 0)
{
+ if(state != SND_PCM_STATE_RUNNING)
+ {
+ err = psnd_pcm_start(data->pcmHandle);
+ if(err < 0)
+ {
+ err = xrun_recovery(data->pcmHandle, err);
+ if (err < 0)
+ {
+ AL_PRINT("start failed: %s\n", psnd_strerror(err));
+ break;
+ }
+ }
+ }
Sleep(1);
continue;
}