$NetBSD: patch-ad,v 1.3 2002/12/02 20:29:49 drochner Exp $ --- src/wavplay.c.orig Mon Dec 2 20:48:24 2002 +++ src/wavplay.c Mon Dec 2 20:52:36 2002 @@ -19,6 +19,14 @@ #include #include #include +#ifdef __NetBSD__ +#include +# ifdef HAVE_OSS +# include +# else +# include +# endif +#endif #if defined(linux) || defined(__CYGWIN32__) # include #endif @@ -64,8 +72,8 @@ gint abuf_size; guchar *audiobuf; -#if defined(linux) || defined(__FreeBSD__) -#define DEFAULT_AUDIO_DEVICE "/dev/dsp" +#if defined(linux) || defined(__FreeBSD__) || (defined(__NetBSD__) && defined(HAVE_OSS)) +#define DEFAULT_AUDIO_DEVICE "@DEVOSSAUDIO@" #elif defined (aix) #define DEFAULT_AUDIO_DEVICE "" #else @@ -299,7 +307,7 @@ #endif -#if defined(linux) || defined(__FreeBSD__) +#if defined(linux) || defined(__FreeBSD__) || (defined(__NetBSD__) && defined(HAVE_OSS)) /* open the sound-device of linux and set cd-quality */ @@ -350,7 +358,7 @@ #endif -#if defined(sun) || defined(__OpenBSD__) +#if defined(sun) || defined(__OpenBSD__) || (defined(__NetBSD__) && !defined(HAVE_OSS)) /* open the sound-device of solaris and set cd-quality */ @@ -377,7 +385,7 @@ info.play.precision = 16; info.play.encoding = AUDIO_ENCODING_LINEAR; info.play.buffer_size = abuf_size; -#ifndef __OpenBSD__ +#if !defined(__OpenBSD__) && !defined(__NetBSD__) info.output_muted = 0; #endif @@ -678,10 +686,10 @@ /* the open sets also the global abuf_size-variable */ -#if defined(linux) || defined(__FreeBSD__) +#if defined(linux) || defined(__FreeBSD__) || (defined(__NetBSD__) && defined(HAVE_OSS)) audio = open_linux_audio(audio_dev); #endif -#if defined(sun) || defined(__OpenBSD__) +#if defined(sun) || defined(__OpenBSD__) || (defined(__NetBSD__) && !defined(HAVE_OSS)) audio = open_solaris_audio(audio_dev); #endif #ifdef aix