static int LoadALSALibrary(void) { int retval = 0; if (alsa_handle == NULL) { alsa_handle = SDL_LoadObject(alsa_library); if (alsa_handle == NULL) { retval = -1; /* Don't call SDL_SetError(): SDL_LoadObject already did. */ } else { retval = load_alsa_syms(); if (retval < 0) { UnloadALSALibrary(); } } } return retval; }
static int LoadALSALibrary(void) { int retval = 0; if (alsa_handle == NULL) { alsa_handle = dlopen(alsa_library, RTLD_NOW); if (alsa_handle == NULL) { retval = -1; SDL_SetError("ALSA: dlopen('%s') failed: %s\n", alsa_library, strerror(errno)); } else { retval = load_alsa_syms(); if (retval < 0) { UnloadALSALibrary(); } } } return retval; }
static int LoadALSALibrary(void) { load_alsa_syms(); return 0; }