-/* $Id$ */
-
/***
This file is part of PulseAudio.
#include "module-detect-symdef.h"
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("Detect available audio hardware and load matching drivers")
-PA_MODULE_VERSION(PACKAGE_VERSION)
-PA_MODULE_USAGE("just-one=<boolean>")
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("Detect available audio hardware and load matching drivers");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(TRUE);
+PA_MODULE_USAGE("just-one=<boolean>");
static const char* const valid_modargs[] = {
"just-one",
#endif
int pa__init(pa_module*m) {
- int just_one = 0, n = 0;
+ pa_bool_t just_one = FALSE;
+ int n = 0;
pa_modargs *ma;
pa_assert(m);
goto fail;
}
-#if HAVE_ALSA
+#ifdef HAVE_ALSA
if ((n = detect_alsa(m->core, just_one)) <= 0)
#endif
#if HAVE_OSS
if ((n = detect_oss(m->core, just_one)) <= 0)
#endif
-#if HAVE_SOLARIS
+#ifdef HAVE_SOLARIS
if ((n = detect_solaris(m->core, just_one)) <= 0)
#endif
-#if OS_IS_WIN32
+#ifdef OS_IS_WIN32
if ((n = detect_waveout(m->core, just_one)) <= 0)
#endif
{
pa_log_info("loaded %i modules.", n);
/* We were successful and can unload ourselves now. */
- pa_module_unload_request(m);
+ pa_module_unload_request(m, TRUE);
pa_modargs_free(ma);