From a27b855a398f6f6c639eed2990e723cca13e3497 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 14 Jan 2008 12:59:44 -0800 Subject: [PATCH] Make sure the stream is playing when it's full --- Alc/alsa.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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; } -- 2.11.4.GIT