aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alsa.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-09-23 01:33:58 -0700
committerChris Robinson <[email protected]>2009-09-23 01:33:58 -0700
commit201b108a543c8d0472341918ffac012ad1d94a69 (patch)
tree029e5f940ee83554720c92ef71ab667ab82998ed /Alc/alsa.c
parentbdbdbcea26d4a12d4d3f76ad3724f2ad12a55358 (diff)
Attempt to reload backend libs when probing, if they didn't initially load
Diffstat (limited to 'Alc/alsa.c')
-rw-r--r--Alc/alsa.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Alc/alsa.c b/Alc/alsa.c
index 1fa90039..eb58199e 100644
--- a/Alc/alsa.c
+++ b/Alc/alsa.c
@@ -775,7 +775,7 @@ void alc_alsa_init(BackendFuncs *func_list)
{
char *str;
- *func_list = alsa_funcs;
+ if(func_list) *func_list = alsa_funcs;
#ifdef HAVE_DLFCN_H
alsa_handle = dlopen("libasound.so.2", RTLD_NOW);
@@ -877,8 +877,8 @@ void alc_alsa_deinit(void)
#ifdef HAVE_DLFCN_H
if(alsa_handle)
dlclose(alsa_handle);
- alsa_handle = NULL;
#endif
+ alsa_handle = NULL;
}
void alc_alsa_probe(int type)
@@ -891,8 +891,8 @@ void alc_alsa_probe(int type)
char name[128];
ALuint i;
- if(!alsa_handle)
- return;
+ if(!alsa_handle) alc_alsa_init(NULL);
+ if(!alsa_handle) return;
psnd_ctl_card_info_malloc(&info);
psnd_pcm_info_malloc(&pcminfo);