aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-08-20 03:00:38 -0700
committerChris Robinson <[email protected]>2011-08-20 03:00:38 -0700
commit80b8abb0ec69b8c742c38f35e94870e6a27b852b (patch)
treeed5f5ee9d5c43293dba969157fbea6570928abe1 /Alc
parent529ff3197ac6b352c10ef4391ba8bc8c18a43ce5 (diff)
Don't enumerate "PulseAudio Default" in the ALL_DEVICES list
Diffstat (limited to 'Alc')
-rw-r--r--Alc/backends/pulseaudio.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/Alc/backends/pulseaudio.c b/Alc/backends/pulseaudio.c
index 39df3282..787d6a58 100644
--- a/Alc/backends/pulseaudio.c
+++ b/Alc/backends/pulseaudio.c
@@ -757,21 +757,9 @@ static void probe_devices(ALboolean capture)
pa_operation *o;
if(capture == AL_FALSE)
- {
- allDevNameMap[0].name = strdup(pulse_device);
- allDevNameMap[0].device_name = NULL;
- numDevNames = 1;
-
o = pa_context_get_sink_info_list(context, sink_device_callback, loop);
- }
else
- {
- allCaptureDevNameMap[0].name = strdup(pulse_device);
- allCaptureDevNameMap[0].device_name = NULL;
- numCaptureDevNames = 1;
-
o = pa_context_get_source_info_list(context, source_device_callback, loop);
- }
while(pa_operation_get_state(o) == PA_OPERATION_RUNNING)
pa_threaded_mainloop_wait(loop);
pa_operation_unref(o);
@@ -869,9 +857,9 @@ static ALCboolean pulse_open_playback(ALCdevice *device, const ALCchar *device_n
if(!allDevNameMap)
probe_devices(AL_FALSE);
- if(!device_name && numDevNames > 0)
- device_name = allDevNameMap[0].name;
- else
+ if(!device_name)
+ device_name = pulse_device;
+ else if(strcmp(device_name, pulse_device) != 0)
{
ALuint i;
@@ -1108,9 +1096,9 @@ static ALCboolean pulse_open_capture(ALCdevice *device, const ALCchar *device_na
if(!allCaptureDevNameMap)
probe_devices(AL_TRUE);
- if(!device_name && numCaptureDevNames > 0)
- device_name = allCaptureDevNameMap[0].name;
- else
+ if(!device_name)
+ device_name = pulse_device;
+ else if(strcmp(device_name, pulse_device) != 0)
{
ALuint i;