diff options
author | Chris Robinson <[email protected]> | 2010-09-25 20:20:10 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2010-09-25 20:20:10 -0700 |
commit | 9fa2db0227e8fabb3fa26e3e299602321fe14c79 (patch) | |
tree | 87941412bcc40820d7e5b5ab77cfde45781c5485 /Alc | |
parent | 4c75a72a902780b362d2950edf8382e5a7417447 (diff) |
Don't try to open the ALSA device a second time if the first fails
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/alsa.c | 10 |
1 files changed, 0 insertions, 10 deletions
@@ -500,11 +500,6 @@ static ALCboolean alsa_open_playback(ALCdevice *device, const ALCchar *deviceNam data = (alsa_data*)calloc(1, sizeof(alsa_data)); i = psnd_pcm_open(&data->pcmHandle, driver, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK); - if(i < 0) - { - Sleep(200); - i = psnd_pcm_open(&data->pcmHandle, driver, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK); - } if(i >= 0) { i = psnd_pcm_nonblock(data->pcmHandle, 0); @@ -800,11 +795,6 @@ static ALCboolean alsa_open_capture(ALCdevice *pDevice, const ALCchar *deviceNam i = psnd_pcm_open(&data->pcmHandle, driver, SND_PCM_STREAM_CAPTURE, SND_PCM_NONBLOCK); if(i < 0) { - Sleep(200); - i = psnd_pcm_open(&data->pcmHandle, driver, SND_PCM_STREAM_CAPTURE, SND_PCM_NONBLOCK); - } - if(i < 0) - { AL_PRINT("Could not open capture device '%s': %s\n", driver, psnd_strerror(i)); free(data); return ALC_FALSE; |