aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/pulseaudio.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-05-30 23:04:04 -0700
committerChris Robinson <[email protected]>2010-05-30 23:04:04 -0700
commit694e9a5fec3aa9695e168480253c21486840d35c (patch)
tree8efb7a70b6388f74eab7c4e7d4b155f99002ab8f /Alc/pulseaudio.c
parent9ac5d8ad2d01e67e706abb768dea0cbf948c1522 (diff)
Always add the default PulseAudio device when probing
Diffstat (limited to 'Alc/pulseaudio.c')
-rw-r--r--Alc/pulseaudio.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/Alc/pulseaudio.c b/Alc/pulseaudio.c
index d1932b34..c197e07c 100644
--- a/Alc/pulseaudio.c
+++ b/Alc/pulseaudio.c
@@ -580,6 +580,21 @@ static void probe_devices(ALboolean capture)
{
pa_threaded_mainloop *loop;
+ if(capture == AL_FALSE)
+ {
+ allDevNameMap = malloc(sizeof(DevMap) * 1);
+ allDevNameMap[0].name = strdup("PulseAudio Default");
+ allDevNameMap[0].device_name = NULL;
+ numDevNames = 1;
+ }
+ else
+ {
+ allCaptureDevNameMap = malloc(sizeof(DevMap) * 1);
+ allCaptureDevNameMap[0].name = strdup("PulseAudio Capture");
+ allCaptureDevNameMap[0].device_name = NULL;
+ numCaptureDevNames = 1;
+ }
+
if((loop=ppa_threaded_mainloop_new()) &&
ppa_threaded_mainloop_start(loop) >= 0)
{
@@ -592,21 +607,9 @@ static void probe_devices(ALboolean capture)
pa_operation *o;
if(capture == AL_FALSE)
- {
- allDevNameMap = malloc(sizeof(DevMap) * 1);
- allDevNameMap[0].name = strdup("PulseAudio on default");
- allDevNameMap[0].device_name = NULL;
- numDevNames = 1;
o = ppa_context_get_sink_info_list(context, sink_device_callback, loop);
- }
else
- {
- allCaptureDevNameMap = malloc(sizeof(DevMap) * 1);
- allCaptureDevNameMap[0].name = strdup("PulseAudio Capture");
- allCaptureDevNameMap[0].device_name = NULL;
- numCaptureDevNames = 1;
o = ppa_context_get_source_info_list(context, source_device_callback, loop);
- }
while(ppa_operation_get_state(o) == PA_OPERATION_RUNNING)
ppa_threaded_mainloop_wait(loop);
ppa_operation_unref(o);