$NetBSD: patch-ad,v 1.5 2009/02/11 21:48:39 shattered Exp $ --- src/wavplay.c.orig 2008-08-20 15:34:02.000000000 +0000 +++ src/wavplay.c @@ -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 @@ -72,8 +80,8 @@ gint read_line(gint fd, gchar *ptr, gint off_t is_std_wav_file(int f, off_t *offset); -#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) @@ -309,7 +317,7 @@ int audio_write( void *buffer, int buf_s #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 */ @@ -360,7 +368,7 @@ gint flags; #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 */ @@ -387,7 +395,7 @@ gint flags; 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 @@ -787,10 +795,10 @@ gchar keybuffer[MAXLINE]; /* 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