45 lines
1.1 KiB
Text
45 lines
1.1 KiB
Text
Index: src/modules/module-detect.c
|
|
--- src/modules/module-detect.c.orig
|
|
+++ src/modules/module-detect.c
|
|
@@ -32,6 +32,10 @@
|
|
#include <sys/types.h>
|
|
#include <sys/stat.h>
|
|
|
|
+#ifdef __OpenBSD__
|
|
+#include <sndio.h>
|
|
+#endif
|
|
+
|
|
#include <pulsecore/core-error.h>
|
|
#include <pulsecore/module.h>
|
|
#include <pulsecore/modargs.h>
|
|
@@ -236,6 +240,20 @@ static int detect_solaris(pa_core *c, int just_one) {
|
|
}
|
|
#endif
|
|
|
|
+#ifdef __OpenBSD__
|
|
+static int detect_sndio(pa_core *c, int just_one) {
|
|
+ char args[64];
|
|
+ pa_module *m = NULL;
|
|
+
|
|
+ pa_snprintf(args, sizeof(args), "device=%s", SIO_DEVANY);
|
|
+
|
|
+ if (pa_module_load(&m, c, "module-sndio", args) < 0)
|
|
+ return 0;
|
|
+
|
|
+ return 1;
|
|
+}
|
|
+#endif
|
|
+
|
|
#ifdef OS_IS_WIN32
|
|
static int detect_waveout(pa_core *c, int just_one) {
|
|
pa_module *m = NULL;
|
|
@@ -278,6 +296,9 @@ int pa__init(pa_module*m) {
|
|
#endif
|
|
#ifdef OS_IS_WIN32
|
|
if ((n = detect_waveout(m->core, just_one)) <= 0)
|
|
+#endif
|
|
+#ifdef __OpenBSD__
|
|
+ if ((n = detect_sndio(m->core, just_one)) <= 0)
|
|
#endif
|
|
{
|
|
pa_log_warn("failed to detect any sound hardware.");
|