aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/pulseaudio.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-08-27 06:09:33 -0700
committerChris Robinson <[email protected]>2009-08-27 06:09:33 -0700
commitbb121e68a618d1881a6e35c47938ce0650d07afb (patch)
tree620e024aa067cc96d36a91e2210beffc2115220e /Alc/pulseaudio.c
parent1ec26fd789ddfcbabbeae003f286cc01062721c0 (diff)
Rebuild device lists when retrieving them
Diffstat (limited to 'Alc/pulseaudio.c')
-rw-r--r--Alc/pulseaudio.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/Alc/pulseaudio.c b/Alc/pulseaudio.c
index 88f381b9..8275033b 100644
--- a/Alc/pulseaudio.c
+++ b/Alc/pulseaudio.c
@@ -695,20 +695,31 @@ LOAD_FUNC(pa_stream_disconnect);
LOAD_FUNC(pa_threaded_mainloop_lock);
#undef LOAD_FUNC
-
- AppendDeviceList(pulse_device);
- AppendAllDeviceList(pulse_device);
-
- AppendCaptureDeviceList(pulse_capture_device);
} //}}}
void alc_pulse_deinit(void) //{{{
{
+ if(pa_handle)
+ {
#ifdef _WIN32
- FreeLibrary(pa_handle);
+ FreeLibrary(pa_handle);
#elif defined (HAVE_DLFCN_H)
- dlclose(pa_handle);
+ dlclose(pa_handle);
#endif
+ }
pa_handle = NULL;
} //}}}
+
+void alc_pulse_probe(int type) //{{{
+{
+ if(!pa_handle)
+ return;
+
+ if(type == DEVICE_PROBE)
+ AppendDeviceList(pulse_device);
+ else if(type == ALL_DEVICE_PROBE)
+ AppendAllDeviceList(pulse_device);
+ else if(type == CAPTURE_DEVICE_PROBE)
+ AppendCaptureDeviceList(pulse_capture_device);
+} //}}}
//}}}