From 3be399c55555fdce2a7cfe35d5893691136cdfa5 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 19 May 2009 06:37:22 -0700 Subject: Do not open pulseaudio if it didn't load --- Alc/pulseaudio.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Alc/pulseaudio.c b/Alc/pulseaudio.c index 83c7c84b..ee63fc3b 100644 --- a/Alc/pulseaudio.c +++ b/Alc/pulseaudio.c @@ -429,6 +429,9 @@ static void pulse_close(ALCdevice *device) //{{{ // OpenAL {{{ static ALCboolean pulse_open_playback(ALCdevice *device, const ALCchar *device_name) //{{{ { + if(!pa_handle) + return ALC_FALSE; + if(device_name) { if(strcmp(device_name, pulse_device) != 0) @@ -445,6 +448,9 @@ static void pulse_close_playback(ALCdevice *device) //{{{ static ALCboolean pulse_open_capture(ALCdevice *device, const ALCchar *device_name, ALCuint frequency, ALCenum format, ALCsizei samples) //{{{ { + if(!pa_handle) + return ALC_FALSE; + if(device_name) { if(strcmp(device_name, pulse_capture_device) != 0) @@ -538,6 +544,7 @@ void alc_pulse_init(BackendFuncs *func_list) //{{{ #else + pa_handle = (void*)0xDEADBEEF; #define LOAD_FUNC(x) p##x = (x) #endif -- cgit v1.2.3