Use /dev/null instead of /dev/mixer

The "mixer" plugin (using -lossaudio) still calls open(2) to get a
file descriptor, it's not need to change the volume, but the code
expects various syscalls to succeed. Using /dev/null ensures the
plug-in will continue to work once /dev/mixer is disabled.

ok gkoehler@
This commit is contained in:
ratchov 2020-04-16 06:49:22 +00:00
parent 0c6c28c32c
commit 1f2701abee
2 changed files with 16 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.113 2020/02/01 15:04:26 naddy Exp $
# $OpenBSD: Makefile,v 1.114 2020/04/16 06:49:22 ratchov Exp $
# XXX ossaudio(3) is only enabled to be used as a mixing device by
# audio/pulseaudio and x11/xfce4/xfce4-mixer
@ -18,7 +18,7 @@ PKGNAME-dv= gstreamer-dv-${V}
PKGNAME-caca= gstreamer-libcaca-${V}
EPOCH-main= 0
REVISION-main= 25
REVISION-main= 26
REVISION-aalib= 13
REVISION-caca= 13
REVISION-dv= 12

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-sys_oss_gstossmixerelement_c,v 1.1 2020/04/16 06:49:22 ratchov Exp $
Index: sys/oss/gstossmixerelement.c
--- sys/oss/gstossmixerelement.c.orig
+++ sys/oss/gstossmixerelement.c
@@ -42,7 +42,7 @@
GST_DEBUG_CATEGORY_EXTERN (oss_debug);
#define GST_CAT_DEFAULT oss_debug
-#define DEFAULT_DEVICE "/dev/mixer"
+#define DEFAULT_DEVICE "/dev/null"
#define DEFAULT_DEVICE_NAME NULL
enum