aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);