summaryrefslogtreecommitdiffstats
path: root/Alc/backends/pulseaudio.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-02-20 20:29:20 -0800
committerChris Robinson <[email protected]>2012-02-20 20:29:20 -0800
commitd24ada7ab7605a7e990fe299fc7d56a08e870c84 (patch)
tree0b82523ad1d2b747a6e90a948b6ea21f109c0c68 /Alc/backends/pulseaudio.c
parent54e2316b65269d37eafa8e99fdaa40126273c3a6 (diff)
Don't accept the pulseaudio default name for capture
Diffstat (limited to 'Alc/backends/pulseaudio.c')
-rw-r--r--Alc/backends/pulseaudio.c10
1 files changed, 6 insertions, 4 deletions
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)