From d24ada7ab7605a7e990fe299fc7d56a08e870c84 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 20 Feb 2012 20:29:20 -0800 Subject: Don't accept the pulseaudio default name for capture --- Alc/backends/pulseaudio.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Alc/backends') diff --git a/Alc/backends/pulseaudio.c b/Alc/backends/pulseaudio.c index 36496fe6..6100d59f 100644 --- a/Alc/backends/pulseaudio.c +++ b/Alc/backends/pulseaudio.c @@ -1080,12 +1080,14 @@ static ALCenum pulse_open_capture(ALCdevice *device, const ALCchar *device_name) if(!allCaptureDevNameMap) probe_devices(AL_TRUE); - if(!device_name) - device_name = pulse_device; - else if(strcmp(device_name, pulse_device) != 0) + if(!device_name && numCaptureDevNames > 0) + { + device_name = allCaptureDevNameMap[0].name; + pulse_name = allCaptureDevNameMap[0].device_name; + } + else { ALuint i; - for(i = 0;i < numCaptureDevNames;i++) { if(strcmp(device_name, allCaptureDevNameMap[i].name) == 0) -- cgit v1.2.3