aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/pulseaudio.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-02-20 21:03:54 -0800
committerChris Robinson <[email protected]>2012-02-20 21:03:54 -0800
commit01d8d956da139180174cea333633023b675dd264 (patch)
tree1710462d89eb33ad507050fbb7a6bc3fe22b95a0 /Alc/backends/pulseaudio.c
parent4f0d862cbe1bc3ae8c85d88238a17cdd60613eea (diff)
Avoid using a default name when opening a PulseAudio device
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 1e4086e1..64204814 100644
--- a/Alc/backends/pulseaudio.c
+++ b/Alc/backends/pulseaudio.c
@@ -216,7 +216,6 @@ typedef struct {
} DevMap;
-static const ALCchar pulse_device[] = "PulseAudio Default";
static DevMap *allDevNameMap;
static ALuint numDevNames;
static DevMap *allCaptureDevNameMap;
@@ -823,9 +822,12 @@ static ALCenum pulse_open_playback(ALCdevice *device, const ALCchar *device_name
if(!allDevNameMap)
probe_devices(AL_FALSE);
- if(!device_name)
- device_name = pulse_device;
- else if(strcmp(device_name, pulse_device) != 0)
+ if(!device_name && numDevNames > 0)
+ {
+ device_name = allDevNameMap[0].name;
+ pulse_name = allDevNameMap[0].device_name;
+ }
+ else
{
ALuint i;