diff options
author | Chris Robinson <[email protected]> | 2009-09-27 01:12:42 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-09-27 01:12:42 -0700 |
commit | c9506d939a10a79d887cb910a7935828765241af (patch) | |
tree | d05048ed18cf7e3d81b3ea98245a392455e715ed /Alc | |
parent | 21217824b7dbb7a1b22f45078e74c6ad90b9675e (diff) |
Make sure ALSA properly loads, and fix the thread stop condition
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/alsa.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -456,17 +456,17 @@ static ALCboolean alsa_open_playback(ALCdevice *device, const ALCchar *deviceNam { if(idx > 0) sprintf(driver, "hw:%d,%d", allDevNameMap[idx].card, allDevNameMap[idx].dev); - goto open_alsa; + break; } } - return ALC_FALSE; + if(idx == numDevNames) + return ALC_FALSE; } alsa_load(); if(!alsa_handle) return ALC_FALSE; -open_alsa: data = (alsa_data*)calloc(1, sizeof(alsa_data)); i = psnd_pcm_open(&data->pcmHandle, driver, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK); @@ -646,7 +646,7 @@ static void alsa_stop_playback(ALCdevice *device) { alsa_data *data = (alsa_data*)device->ExtraData; - if(!data->thread) + if(data->thread) { data->killNow = 1; StopThread(data->thread); |