From 91970bf25406f790adb5d4e3ad8774dcd6075512 Mon Sep 17 00:00:00 2001 From: AliceLR Date: Tue, 26 Jul 2022 19:57:32 -0600 Subject: [PATCH] Use /dev/audio or pkgsrc DEVOSSAUDIO for OSS on NetBSD. --- src/sound_netbsd.c | 2 +- src/sound_oss.c | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/sound_netbsd.c b/src/sound_netbsd.c index 32342af..3f232ed 100644 --- a/src/sound_netbsd.c +++ b/src/sound_netbsd.c @@ -36,7 +36,7 @@ static int init(struct options *options) chkparm1("buffer", bsize = strtoul(token, NULL, 0)); parm_end(); - if ((audio_fd = open("/dev/sound", O_WRONLY)) == -1) + if ((audio_fd = open("/dev/audio", O_WRONLY)) == -1) return -1; /* try to open audioctldevice */ diff --git a/src/sound_oss.c b/src/sound_oss.c index d38b7c7..234bb06 100644 --- a/src/sound_oss.c +++ b/src/sound_oss.c @@ -109,7 +109,14 @@ static void setaudio(int *rate, int *format) static int init(struct options *options) { char **parm = options->driver_parm; - static const char *dev_audio[] = { "/dev/dsp", "/dev/sound/dsp" }; + static const char *dev_audio[] = { +#ifdef DEVOSSAUDIO + DEVOSSAUDIO, /* pkgsrc */ +#endif + "/dev/dsp", + "/dev/sound/dsp", + "/dev/audio" /* NetBSD and SunOS */ + }; audio_buf_info info; static char buf[80]; int i;