aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alsa.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-09-27 03:57:19 -0700
committerChris Robinson <[email protected]>2009-09-27 03:57:19 -0700
commit1d54b7a266874aa39f36d3dd49ea209f519401e8 (patch)
tree3f73aecef6143539c7d557cf82eeee6b0fe0dddd /Alc/alsa.c
parentc9506d939a10a79d887cb910a7935828765241af (diff)
Fix capture, too
Diffstat (limited to 'Alc/alsa.c')
-rw-r--r--Alc/alsa.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Alc/alsa.c b/Alc/alsa.c
index 3e06ba1e..27b4cf34 100644
--- a/Alc/alsa.c
+++ b/Alc/alsa.c
@@ -684,17 +684,17 @@ static ALCboolean alsa_open_capture(ALCdevice *pDevice, const ALCchar *deviceNam
devName = allCaptureDevNameMap[idx].name;
if(idx > 0)
sprintf(driver, "plughw:%d,%d", allCaptureDevNameMap[idx].card, allCaptureDevNameMap[idx].dev);
- goto open_alsa;
+ break;
}
}
- return ALC_FALSE;
+ if(idx == numCaptureDevNames)
+ 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_CAPTURE, SND_PCM_NONBLOCK);