diff options
author | Chris Robinson <[email protected]> | 2012-02-20 21:03:54 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2012-02-20 21:03:54 -0800 |
commit | 01d8d956da139180174cea333633023b675dd264 (patch) | |
tree | 1710462d89eb33ad507050fbb7a6bc3fe22b95a0 | |
parent | 4f0d862cbe1bc3ae8c85d88238a17cdd60613eea (diff) |
Avoid using a default name when opening a PulseAudio device
-rw-r--r-- | Alc/backends/pulseaudio.c | 10 |
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; |