diff options
author | Chris Robinson <[email protected]> | 2008-01-14 12:59:44 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2008-01-14 12:59:44 -0800 |
commit | a27b855a398f6f6c639eed2990e723cca13e3497 (patch) | |
tree | d5ed2028dfc373605eda6b2a9732e4269b5717eb /Alc | |
parent | 1634b69faf895e2666f81af344aad76609cfbc60 (diff) |
Make sure the stream is playing when it's full
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/alsa.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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; } |