$NetBSD: patch-ad,v 1.4 2003/06/05 16:15:48 drochner Exp $ --- src/wavplay.c.orig 2003-04-22 22:28:05.000000000 +0200 +++ src/wavplay.c 2003-06-04 13:32:27.000000000 +0200 @@ -23,6 +23,14 @@ #include #include #include +#ifdef __NetBSD__ +#include +# ifdef HAVE_OSS +# include +# else +# include +# endif +#endif #if defined(linux) || defined(__CYGWIN32__) # include #endif @@ -73,8 +81,8 @@ gint is_in_cd_quality(guchar *hdr); -#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 "" #elif defined(__sgi) @@ -310,7 +318,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 */ @@ -361,7 +369,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 */ @@ -388,7 +396,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 @@ -789,10 +797,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